Hi All,
I am new to this Forum and new to ReST service.
I have converted an EJB3.0 into ReST service. And from my client, I'm able
to invoke the service using the resource URI :
http://localhost:8089/Test/rest/get. where as if I replace the localhost
with IP address or hostname eg:
http://10.2.150.100:8089/Test/rest/get my
client is throwing the following exceptions:
com.sun.jersey.api.client.ClientHandlerException: java.io.IOException: Error
marshalling JAXB object of type "class com.vo.CustomerTypeVO".
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:128)
at com.sun.jersey.api.client.Client.handle(Client.java:435)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:557)
at com.sun.jersey.api.client.WebResource.post(WebResource.java:227)
at
[java.net.ConnectException: Connection refused: connect]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:322)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:246)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
at
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:167)
at
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:143)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
Source)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler$1$1.getOutputStream(URLConnectionClientHandler.java:200)
at
com.sun.jersey.api.client.CommittingOutputStream.commitWrite(CommittingOutputStream.java:114)
at
com.sun.jersey.api.client.CommittingOutputStream.write(CommittingOutputStream.java:86)
at
com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.flushBuffer(UTF8XmlOutput.java:401)
at
com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.endDocument(UTF8XmlOutput.java:132)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.endDocument(XMLSerializer.java:835)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.postwrite(MarshallerImpl.java:371)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:318)
... 12 more
Please let me know if anybody knows the rootcause of this problem...
Thanks in advance!
Rajesh V
--
View this message in context: http://jersey.576304.n2.nabble.com/JerseyTest-Connection-refused-tp6400501p7336297.html
Sent from the Jersey mailing list archive at Nabble.com.