Left the dome light on last night and click click click went the starter. I put the charger on it and after a while it started right up then died. I disconnected the charger and held it at 1500 rpm for about 15 min and take my foot off the XJ would die.

Here is how I fixed it. I locked the doors. Unlocked the rear hatch and front doors with the oem key. Then I clicked the ignition into accessories(down not key on engine off)I turned the headlights on for 10 seconds then off. Turned off key. Then it started with no problems and stayed running.

What caused this? From what I could find either the computer gets confused when you drain the battery and this fixes it or it has something to do with security and this is some kind of bypass.