ive been playing bass for about a year and a half, i can play most songs on bass but i have trouble spontaneously jamming. i want to jam like flea or colin greenwood of radiohead but im having trouble. can someone please tell me how to jam spontaneously.
That's referred to as "improvising". If you say "jamming" most people will think you're talking about playing music with other people.

Sorry i can't help you though. I'm not that good on bass (i can barely play guitar lol).

Edit: i guess Sue already addressed that. sorry
“Science cannot solve the ultimate mystery of nature. And that is because, in the last analysis, we ourselves are part of nature and therefore part of the mystery that we are trying to solve.”

-Max Planck

play music with other people, but improvised basslines
2008 Fender MIA Precision Bass
2006 Fender MIM Jazz bass
Fender rumble 60
Boss bass Overdrive
Dunlop Crybaby Wah Refurb

Learn some theory, learn some technique, learn some basslines...

The links in my sig are good. The "soloing" video talks about the guitar, but many of the ideas can be applied to a bass.
If you play guitar enough it will become like second nature to you, then jamming is easy.
to improvise with another musician you've got have to know a key all over the fretboard. To do this, pick a song where you know what key it is in. I'll help you, take the song N.I.B by black Sabbath, a popular bass song, it's in Eminor. Learn the song, by listening by ear or reading tab. To get jamming as soon as possible what you have to do is learn every note of that key and be able to play it everywhere on the fretboard. Noodle around with the notes of the song eventually expanding it out of the original patterns. This is your fastest way to learn to jam, you could practice scales all day, but I think this is faster for the meantime. If you do this though, you'll have to learn theory because you can't go forever only knowing one key.