I have the exact same problem. it's kinda random, but it happens more on some servers and less on other servers.
Here is the post on the Minecraft forum about it:
http://www.minecraftforum.net/topic/2302054-error-when-joining-server/
That has more info.