The verses concerning Jehoaichin that need to be kept in mind are
"Is this man Jehoiachin a despised, broken pot, an object no one wants? Why will he and his children be hurled out, cast into a land they do not know? O land, land, land, hear the word of the Lord! This is what the Lord says: 'Record this man as if childless, a man who will not prosper in his lifetime, for none of his offspring will prosper, none will sit on the throne of David or rule anymore in Judah.'" - Jeremiah 22:28-30 (NIV)
"'As surely as I live,' declares the Lord, 'even if you, Jehoiachin son of Jehoiakim king of Judah, were a signet ring on my right hand, I would still pull you off.'" - Jeremiah 22:24 (NIV)
Alright, according to Matthew, the geneology was this:
"After the exile to Babylon: Jeconiah (Jehoiachin) was the father of Shealtiel, Shealtiel the father of Zerubbabel," - Matthew 1:12 (NIV)
Wait a moment. That Zerubbabel guy, he looks familiar...
"The word of the Lord came to Haggai a second time on the twenty-fourth day of the month: 'Tell Zerubbabel governor of Judah that I will shake the heavens and the earth.'" - Haggai 2:21 (NIV)
Hold the phone! Zerubbabel is governor of Judah?! But I thought none of Jehoicachin's offspring 'will sit on the throne of David or rule anymore in Judah'? What's going on here?
"'On that day,' declares the Lord Almighty, 'I will take you, my servant Zerubbabel son of Shealtiel,' declares the Lord, 'and I will make you like my signet ring, for I have chosen you,' declares the Lord Almighty." - Haggai 2:23 (NIV)
Oh, I see. God 'pulled off the signet ring', a sign of royalty, with Jehoiachin and then put it back on with Zerubbabel, thus restoring the line.
For more on this check out this site here.
(Edit: Oh boy, I went back and read this and I didn't realize that I sounded so condescending. I'm sorry, it was unintended. I had been searching for an explanation to this geneology problem and I was very happy to discover this. I wanted to relay this in a light-hearted manner by mimicking my thought process and I don't think it came out that way. Forgive me.)