I am having the same problem as the original poster!
My iBook is going on 4 years now and I for the past couple weeks it has shut down while PLUGGED IN.
I really don't think it is a battery issue, I just got a new one from apple a few months ago. I am however using a third party AC adapter.
It shuts down when I am trying to get the iBook to charge, I usually have to jiggle it around and pin the cord in a position so that it will hold a charge. The problem comes when the battery runs down completely and I only have like 5 seconds to find a good position for the cord before it shuts down again. If i can't get it within the first couple times the computer will boot up from sleep but then shut down immediately.
In the past, if I take the batter out and unplug the charger for a few minutes then it will eventually boot back up, but this time it won't!
This is really bad because my thesis is due on Sunday and I really need the computer to work. Luckily I have it backed up, but I am wondering if anyone might know what the issue is. I have heard logic board issues, but I also thought it might be the part on the inside of the computer that the AC cord plugs into. If it is the logic board, does that mean the computer is essentially a goner?
I am going to take it to tekserve tomorrow, but if anyone has any advice I would really appreciate it.