Did this start w/ OS 10.10.? Do you have earlier backups?
First try resetting SMC:
Reset SMC
http://support.apple.com/en-us/HT201295
Does the LED battery indicator work? Did it ever?
Yes - Software problem that could be corrected w/ an update.
No - Check the battery indicator cable connector:
There are 3 2009 15" guides here:
https://www.ifixit.com/Device/MacBook_Pro_15%22_Unibody
This one is on step 19:
https://www.ifixit.com/Guide/MacBook+Pro+15-Inch+Unibody+2.53+GHz+Mid+2009+Logic +Board+Replacement/1556
The Hall Effect sensor is on that cable. That's what causes the MBP to sleep in clamshell mode.
Check the operation of the sensor w/ a magnet.
Some versions of the repair manual talk about this sensor sticking which would imply that these early versions use a reed switch vs the Hall device.
The other less likely problem is that the magnet is missing. It should be in the left side of the display. Use a magnetic metal to check.