The issue may lie with either the dock connector or the battery. Either or both items may need to be replaced. The cheaper solution would be to change the dock connector.
open