This can happen if the charger isn't supplying enough current or if the device thinks it's not being supplied.
However there is a hack to short the data lines which gets over that problem. I've used it to enable my N85 to charge using a blackberry cable from a USB charger.
http://en.wikipedia.org/wiki/Universal_Serial_Bus#Power
"The Dedicated Charging Port shorts the D+ and D- pins with a resistance of at most 200Ω. The short disables data transfer, but allows devices to detect the Dedicated Charging Port and allows very simple, high current chargers to be manufactured."
What is is effectively is identify the data lines (white/green???) and join them so that they are running from the usb socket back to the socket.
I'm attaching a very badly drawn sketch which might help...