Actually, I have the same problem, so I got a new battery, and it appears that the charging circuit in the HP has gone toes up.
Judging from a sample size of 4, where two others have the same problem, there could be some kind of limited life in HP's design.
I have the bad charging circuit issue, found out after I purchased a new battery and had the same (battery not charging issue) i had before. It dies instantly if you unplug it from AC power, with or without a battery. I took the entire thing apart and checked for loose connections and put it back together and had the same issue. Is there a fix short of replacing the motherboard or getting a new computer?