I thought Taliferno's post was an excellent analysis of at least one angle on this subject.
Another reason is that, just like slingers and archers, javelineers require either training or life experience using it for something practical. This means that missile weapon armed light infantry tended to exist in areas where the peasant classes used those particular types of weapons. So as areas under Roman rule became demiliterized, the peasant class stopped using these kind of weapons. The old Hellenic, Iberian, Celtic and Italic traditions of lower class warriors using javelins started to disappear. Also, as Taliferno suggested, the rise of cavalry in general and heavy cavalry in particular caused the javelin thrower's career on the battlefield to become much too dangerous.
However, another factor is that the javelin was used for much longer than commonly believed. As has been said, Muslim Andulasia and free Eire used javelins up to the end of the Medieval period. Even in England up to the Norman invasion in 1066 and the introduction of the Norman style cavalry, knights would use javelins along with their lance. So javelins really didn't just vanish with the fall of the Roman empire.
There are several more reasons, but I need to go eat lunch. Food for thought.
Chairman
Bookmarks