Why Samsung Galaxy Ace GT-S5830i shows only a battery icon instead of booting? I've got a used Samsung Galaxy Ace GT-S5830i smartphone - it had basically no issues, but when I attempted to turn on (it was charged almost all night), what appeared is only a battery icon with no boot. 

It has already happened some times before, but in those cases, taking out battery and putting back always solved the case. 

This time, it didn't. What's the possible reason and how can I fix it?

(if that matters, the mini-USB end of the cable I use for the charger also has some issues, with only making proper contact in some certain positions)
Either your battery has failed (internal connection failure or shorted cell), or the battery contacts in the phone are no longer making contact with the battery terminals.  Most smart phones (including Samsung models, in my experience) will refuse to boot until the battery has a certain level of charge (around 15%); and if the battery won't accept a charge for some reason, the phone will never start up.

If you can, see if the phone will work with a different battery; if so, replacing the battery will solve the problem.  Otherwise, it may be possible to rebend the contact springs, clean the contact surfaces, or otherwise restore good contact to resolve the issue.