The server refuses to accept the request without a defined Content- Length. The client MAY repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request message.
So, the Content-Length header is missing from the request. You must make sure that it is included.
It would be easier to help you if you would post your Java code.