java: 1009) at org. XMLEntityManager. You have missed the colon between hostname and port number. Your connection URL should be. String URL_ connection= " jdbc: mysql: / / localhost: 3306/ vendor" ;. java: 358) at net. addInputStream( Configuration. java: 252) at net. addClass( Configuration. java: 286) at dbdemo. UnknownHostException: Host is unresolved: Thrown to indicate that the IP address of a host could not be. This left whitespace, and causes the UnknownHostException as a host with whitespace is not a valid host. Hibernate can resolve the DTDs locally ( without a network connection). Your DOCTYPE is using the new namespace hibernate.
org/ dtd/ ) for Hibernate 3. 6, so you might have an older version of the Hibernate. The parser is trying to download the DTD from hibernate. net in order to validate the parsed XML. UnknownHostException: The server where the code is deployed does not have access to w3. Can anyone plzzzzzz tell me what exactly is the problem with my code following is my hibernate. Nested exception: java. UnknownHostException: hibernate. GA/ org/ hibernate/ util/ DTDEntityResolver. java# DTDEntityResolver the below worked for us