An Error: "java.net.UnknownHostException: http" is thrown when invoking a Webservice (Doc ID 1296614.1)

Last updated on NOVEMBER 02, 2016

Applies to:

Oracle Java CAPS Enterprise Service Bus - Version R6 to R6.3 [Release 6.0]
Information in this document applies to any platform.

Symptoms

When attempting to invoke a Web Service an error occurs which is included below. There are two exceptions listed in the sever.log (<JCAPS-ROOT>/appserver/domains/domain-name/logs/server.log) which are typical about this error:

  1. A SEVERE exception "java.net.UnknownHostException: http" reported by: com.sun.xml.rpc.client.http.HttpClientTransport

  2. A SEVERE exception "java.rmi.RemoteException: HTTP transport error: java.lang.NullPointerException; nested exception is:
    HTTP transport error: java.lang.NullPointerException" reported by the Java Collaboration Definition.

 This error occurs after a configuration change or after first implementing the project.

java.net.UnknownHostException: http
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
    at     sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
    at sun.net.www.http.HttpClient.New(HttpClient.java:306)
    at sun.net.www.http.HttpClient.New(HttpClient.java:323)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)
    at com.sun.xml.rpc.client.http.HttpClientTransport$1.run(HttpClientTransport.java:433)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.rpc.client.http.HttpClientTransport.writeMessageToConnection(HttpClientTransport.java:429)
    at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:111)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:113) ...

This error does not report the full host name of the web service in the error, just:
java.net.UnknownHostException: http



The issue can be reproduced at will with the following steps:


    1. Using a sample message, invoke the project that in turn invokes the Web service.
    2. When the Web Service is invoked (the Java CAPS project acting as a Web Service Client) an error is produced.
    3. After this error occurs, the transaction fails to complete, or the error is caught depending on the Java code within the Java Collaboration Definition (JCD).


The issue has the following business impact:

    Due to this issue, users cannot use this service for production or testing purposes.

Changes

A change in the Web Service Client configuration is typically involved when this issue is experienced.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms