1

i have a intermittent problem with my WebService after a JBoss upgrade from 5 to 7. I'am using Apache CXF 2.6.6 and Java 1.7_u67. About 90% of the webservice requests get an response from the server. But sometimes the webservice client gets a SocketException: Unexpected end of file from server.

I tried to evoke the problem using SoapUI, but this failed. With SoapUI the webservice works fine about all the time. I figured out that there is no incoming soap request on server side when the client gets the exception (JBoss root logging = Trace and Apache CXF logging is enabled / No new entries in the log files).

Then i tried something else: Between each webservice request fromt the client i've waited about 60sec. and i got no exception. My conclusion is that there must be a problem with the http connector or http connection. Maybe i can define a timeout or something else?!

How can i fix the problem with JBoss7? I think its a JBoss configuration issue.

Caused by: javax.xml.ws.WebServiceException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) [cxf-rt-frontend-jaxws-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at com.sun.proxy.$Proxy45.sucheReklamationen(Unknown Source)
... 60 more 

Caused by: java.net.SocketException: SocketException invoking http://WEBSERVICEURL/WebserviceImpl: Unexpected end of file from server
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_67]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_67]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_67]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_67]
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1469) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1454) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:659) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) [cxf-rt-frontend-simple-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) [cxf-rt-frontend-jaxws-2.6.6-redhat-3.jar:2.6.6-redhat-3]
... 61 more

Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772) [rt.jar:1.7.0_67]
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633) [rt.jar:1.7.0_67]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323) [rt.jar:1.7.0_67]
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) [rt.jar:1.7.0_67]
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1606) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1532) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1440) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
... 71 more
Darkspire
  • 11
  • 2
  • try check this http://stackoverflow.com/questions/22147457/caused-by-java-net-socketexception-unexpected-end-of-file-from-server – Federico Sierra Jan 08 '15 at 09:32
  • Hi Federico, thanks for your reply. I found this thread a few days ago, but i don't know how to set the keep-alive attribute in jboss? I "googled" it, but there were no matches that helped me. – Darkspire Jan 08 '15 at 09:50

0 Answers0