I am just now having the same problem. I just installed iOS 5 on my iPhone 4 and yesterday on the previous version of iOS it charged just fine from my MacBook Pro (mid-2009 version) with the original cord that came with the phone. Suddenly today after fully upgrading to iOS 5 it stopped charging and stated "Charging is not supported with this accessory" or something to that effect.
To make sure it wasn't my USB port I plugged in a thumb drive and it read the drive normally and to test the cable I plugged my iPad 2 into it (also running iOS 5) and it charges normally as well.
I tried plugging the iPhone into a wall charger and still comes up with the same message, even after I tried the cable that came with my iPad 2.
I tried the trick about plugging it in and doing a hard reset, which worked to a small extent, it now just displays the fully charged icon, but the phone is at 63% battery and appears to still be losing power.
Anyone have any suggestions about how to possibly fix this issue?
Thanks!