Forum Discussion

asmitaitis's avatar
13 years ago

java.net.unknownhostexception

I have a webservice which works fine outside office network, but inside office it gives me

Mon Oct 29 15:03:08 EDT 2012:ERROR:java.net.UnknownHostException: XXXXXXXXXXXXXXX
java.net.UnknownHostException: XXXXXXXXXXXXXXX
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at org.apache.commons.ssl.Java14.connectSocket(Java14.java:190)
at org.apache.commons.ssl.Java14.buildSocket(Java14.java:153)
at org.apache.commons.ssl.JavaImpl.createSocket(JavaImpl.java:206)
at org.apache.commons.ssl.SSL.createSocket(SSL.java:543)
at org.apache.commons.ssl.SSLClient.createSocket(SSLClient.java:221)
at org.apache.commons.ssl.HttpSecureProtocol.createSocket(HttpSecureProtocol.java:90)
at com.eviware.soapui.impl.wsdl.support.http.SoapUIEasySSLProtocolSocketFactory.createSocket(SoapUIEasySSLProtocolSocketFactory.java:47)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(SoapUIMultiThreadedHttpConnectionManager.java:1637)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:202)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Please help.
  • deggial's avatar
    deggial
    Occasional Contributor
    I guess you should add corresponding entry to hosts file on your machine.
  • MartinSpamer's avatar
    MartinSpamer
    Frequent Contributor
    java.net.UnknownHostException say it all. It couldn't get an IP address for the host name you've used.

    Therefore:

    1) You used the wrong URL
    2) Your DNS don't know that host (server)

    Try the IP address and if that works define the server in your hosts file.