my lenovo g450 when charger plugged in its charging for 30 seconds and automatically disconnecting (ie; neither charging, nor its showing plugged in). and when i manually reconnect (plug in) the charger it will again charge for around 30 seconds.
but when the laptop is shutdown i could charge it fully..no issues.
Is it a new Lenovo battery or a Chinese copy? If a copy that is likely the issue, try an official Lenovo battery, possibly a different charger. If neither of those help, you would need to have the connections checked and possibly replaced.