Attaching 50mm 1.8 lens to nikon d5000?

I attached my new nikkor lens to my nikon d5000, it clicked in place and everything, but when I turn my camera on it says "lens not attatched" what is wrong and what can I do?
Added (1). It is the "50mm f/1.8 series E AIS lens" pancake style

Is it an AF or AF-S model? The contacts on your camera might need to be cleaned…

Make sure the lens is 100% attached. The last little bit goes harder than you might think. The window that shows you the distances should be centered at the 12:00 position. The lens should have a definite clock into place.

Adjust everything as usual

Nice lens! It's mounted all right. Set your camera's mode to M.
http://www.kenrockwell.com/...s.htm#dslr
Tsk, tsk. No meter, no AF. I hope you know how to do full manual photography.
- Nikon Camera Lens not attaching to Body?
- Nikkor 50mm AF-S 50mm f/1.4G or AF 50mm f/1.8G?
- Are 50mm lens of any company like nikon, canon or sony same in performance? Or nikon's 50mm are better?
- If I use an AF Nikkor 50mm f/1.4d lens on a D5000, will it damage the lens? - 1
- Is a Nikon 50mm f/1.8D AF Nikkor Lens compatable with a nikon D5000 camera?