The javelin of lightning's special effect is not a spell. Anything that is a spell uses the word "spell" to indicate that. So Globe of Invulnerability will not block a javelin of lightning. Jeremy Crawford was asked about the (extremely similar) staff of thunder and lightning, and gave the same answer.
With that said, the rule for spells cast from magic items is on page 141 of the DMG:
Some magic items allow the user to cast a spell from the item. The spell is cast at the lowest possible spell level, doesn't expend any of the user's spell slots, and requires no components, unless the item's description says otherwise.
So if you used an item that allows you to cast lightning bolt, rather than the javelin of lightning, the lightning bolt would be cast as a 3rd-level spell, since that is the lowest spell level at which lightning bolt can be cast.