I had the same problem. My Camera worked with external power only, and even then, the video was unstable.
My camera model is DS 2cd2t45fwd.
I cut the wires (female rj45 with poe support) and I replaced the connector. Then, Bingo!!! everything worked great!!!
Poe works now and the camera...