Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-09-29 Thread Willem Jiang

It's here CXF-3833, I just committed a patch for it.

[1] https://issues.apache.org/jira/browse/CXF-3833

On Thu Sep 29 13:59:36 2011, xuhb wrote:

Thanks for William Jiang.

I also encounter such a problem. maxIdleTime works well;

Will cxf support to configure maxIdleTime for jetty-transport ?

- Original Message -
From: "Willem Jiang"
To:
Sent: Wednesday, September 28, 2011 5:35 PM
Subject: Re: Caused by: java.net.SocketException: Unexpected end of file from 
server


Just one comment for the maxIdleTime. Jetty use this parameter to check
the underlayer stream's states,
the timeout timer will be reset when there is any read or write
operation on the stream.

On Wed Sep 28 13:39:03 2011, Freeman Fang wrote:

Hi,

I've encounter similar exception lately(with Cxf 2.4.2), client
exception like
org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)

at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at $Proxy34.sayHi(Unknown Source)
at
org.apache.servicemix.examples.cxf.HelloWorld_HelloWorldImplPort_Client.main(HelloWorld_HelloWorldImplPort_Client.java:78)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.SocketException: SocketException invoking
http://localhost:8181/cxf/HelloWorld: Unexpected end of file from server
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1426)

at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1411)

at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:644)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

... 15 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)

at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1531)

at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489)

at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1397)

... 18 more

though I've seen this exception when deploy cxf service in OSGi
container which use http-osgi service, but the underlying http server
is still jetty(pax-web is based on jetty), so I believe that's the
same case for standalone cxf http transport. The key reason of this
exception is that on the server side the service process take a very
long time, let's say 10 mins, so the connection between client and
server become kinda of idle, for me in this case only configure client
side connectionTimeout and receiveTimeOut isn't enough, we also need
configure jetty server connector to set a longer maxIdleTime which can
honor this long connection idle, for pax-web, the standard jetty.xml
configuration is acceptable so it's just like
300
For cxf jetty server, I believe the httpj:connector here[1] should
also work

[1]http://cxf.apache.org/docs/jetty-configuration.html

Freeman
On 2011-8-19, at 下午7:54, Blue Diamond wrote:


*Please let me know if this issue was resolved in later versions of
2.3.x.*

I am facing a socket issue with CXF 2.3.0. My service request takes
around
10 minu

Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-09-28 Thread xuhb
Thanks for William Jiang.

I also encounter such a problem. maxIdleTime works well;

Will cxf support to configure maxIdleTime for jetty-transport ?

- Original Message - 
From: "Willem Jiang" 
To: 
Sent: Wednesday, September 28, 2011 5:35 PM
Subject: Re: Caused by: java.net.SocketException: Unexpected end of file from 
server


Just one comment for the maxIdleTime. Jetty use this parameter to check 
the underlayer stream's states,
the timeout timer will be reset when there is any read or write 
operation on the stream.

On Wed Sep 28 13:39:03 2011, Freeman Fang wrote:
> Hi,
>
> I've encounter similar exception lately(with Cxf 2.4.2), client 
> exception like
> org.apache.cxf.interceptor.Fault: Could not send Message.
> at 
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>  
>
> at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>  
>
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
> at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
> at $Proxy34.sayHi(Unknown Source)
> at 
> org.apache.servicemix.examples.cxf.HelloWorld_HelloWorldImplPort_Client.main(HelloWorld_HelloWorldImplPort_Client.java:78)
>  
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
> at java.lang.Thread.run(Thread.java:680)
> Caused by: java.net.SocketException: SocketException invoking 
> http://localhost:8181/cxf/HelloWorld: Unexpected end of file from server
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  
>
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>  
>
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1426)
>  
>
> at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1411)
>  
>
> at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:644)
> at 
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>  
>
> ... 15 more
> Caused by: java.net.SocketException: Unexpected end of file from server
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
> at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
> at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
>  
>
> at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
> at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1531)
>  
>
> at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489)
>  
>
> at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1397)
>  
>
> ... 18 more
>
> though I've seen this exception when deploy cxf service in OSGi 
> container which use http-osgi service, but the underlying http server 
> is still jetty(pax-web is based on jetty), so I believe that's the 
> same case for standalone cxf http transport. The key reason of this 
> exception is that on the server side the service process take a very 
> long time, let's say 10 mins, so the connection between client and 
> server become kinda of idle, for me in this case only configure client 
> side connectionTimeout and receiveTimeOut isn't enough, we also need 
> configure jetty server connector to set a longer maxIdleTime which can 
> honor this long connection idle, for pax-web, the standard jetty.xml 
> configuration is accept

Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-09-28 Thread Willem Jiang
Just one comment for the maxIdleTime. Jetty use this parameter to check 
the underlayer stream's states,
the timeout timer will be reset when there is any read or write 
operation on the stream.


On Wed Sep 28 13:39:03 2011, Freeman Fang wrote:

Hi,

I've encounter similar exception lately(with Cxf 2.4.2), client 
exception like

org.apache.cxf.interceptor.Fault: Could not send Message.
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) 

at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) 


at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)

at $Proxy34.sayHi(Unknown Source)
at 
org.apache.servicemix.examples.cxf.HelloWorld_HelloWorldImplPort_Client.main(HelloWorld_HelloWorldImplPort_Client.java:78) 


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.SocketException: SocketException invoking 
http://localhost:8181/cxf/HelloWorld: Unexpected end of file from server

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 

at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 


at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1426) 

at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1411) 

at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)

at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:644)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) 


... 15 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) 


at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1531) 

at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489) 

at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1397) 


... 18 more

though I've seen this exception when deploy cxf service in OSGi 
container which use http-osgi service, but the underlying http server 
is still jetty(pax-web is based on jetty), so I believe that's the 
same case for standalone cxf http transport. The key reason of this 
exception is that on the server side the service process take a very 
long time, let's say 10 mins, so the connection between client and 
server become kinda of idle, for me in this case only configure client 
side connectionTimeout and receiveTimeOut isn't enough, we also need 
configure jetty server connector to set a longer maxIdleTime which can 
honor this long connection idle, for pax-web, the standard jetty.xml 
configuration is acceptable so it's just like

300
For cxf jetty server, I believe the httpj:connector here[1] should 
also work


[1]http://cxf.apache.org/docs/jetty-configuration.html

Freeman
On 2011-8-19, at 下午7:54, Blue Diamond wrote:

*Please let me know if this issue was resolved in later versions of 
2.3.x.*


I am facing a socket issue with CXF 2.3.0. My service request takes 
around
10 minutes so I have set my socket time out on the client side. But 
when the
service sends response, I see the following exception on the client 
side. No

exception on the server.

NOTE: This problem only occurs when WS-Security is engaged. On plain web
service endpoints it works fine even with large delays.

Client uses Dispatch model.

Aug 19, 2011 5:09:32 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for {
http://ns.ca.com/catalyst/node}No

Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-09-27 Thread Freeman Fang

Hi,

I've encounter similar exception lately(with Cxf 2.4.2), client  
exception like

org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor 
$ 
MessageSenderEndingInterceptor 
.handleMessage(MessageSenderInterceptor.java:64)
	at  
org 
.apache 
.cxf 
.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: 
134)

at $Proxy34.sayHi(Unknown Source)
	at  
org 
.apache 
.servicemix 
.examples 
.cxf 
.HelloWorld_HelloWorldImplPort_Client 
.main(HelloWorld_HelloWorldImplPort_Client.java:78)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.SocketException: SocketException invoking http://localhost:8181/cxf/HelloWorld 
: Unexpected end of file from server
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
Method)
	at  
sun 
.reflect 
.NativeConstructorAccessorImpl 
.newInstance(NativeConstructorAccessorImpl.java:39)
	at  
sun 
.reflect 
.DelegatingConstructorAccessorImpl 
.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.mapException(HTTPConduit.java:1426)
	at org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.close(HTTPConduit.java:1411)
	at  
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java: 
644)
	at org.apache.cxf.interceptor.MessageSenderInterceptor 
$ 
MessageSenderEndingInterceptor 
.handleMessage(MessageSenderInterceptor.java:62)

... 15 more
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
	at  
sun 
.net 
.www 
.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java: 
1195)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java: 
379)
	at org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1531)
	at org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.handleResponse(HTTPConduit.java:1489)
	at org.apache.cxf.transport.http.HTTPConduit 
$WrappedOutputStream.close(HTTPConduit.java:1397)

... 18 more

though I've seen this exception when deploy cxf service in OSGi  
container which use http-osgi service, but the underlying http server  
is still jetty(pax-web is based on jetty), so I believe that's the  
same case for standalone cxf http transport. The key reason of this  
exception is that on the server side the service process take a very  
long time, let's say 10 mins, so the connection between client and  
server become kinda of idle, for me in this case only configure client  
side connectionTimeout and receiveTimeOut isn't enough, we also need  
configure jetty server connector to set a longer maxIdleTime which can  
honor this long connection idle,  for pax-web, the standard jetty.xml  
configuration is acceptable so it's just like

300
For cxf jetty server, I believe the httpj:connector here[1] should  
also work


[1]http://cxf.apache.org/docs/jetty-configuration.html

Freeman
On 2011-8-19, at 下午7:54, Blue Diamond wrote:

*Please let me know if this issue was resolved in later versions of  
2.3.x.*


I am facing a socket issue with CXF 2.3.0. My service request takes  
around
10 minutes so I have set my socket time out on the client side. But  
when the
service sends response, I see the following exception on the client  
side. No

exception on the server.

NOTE: This problem only occurs when WS-Security is engaged. On plain  
web

service endpoints it works fine even with large delays.

Client uses Dispatch model.

Aug 19, 2011 5:09:32 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for {
http://ns.ca.com/catalyst/node}NodeX509#{http://cxf.apac

Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-08-19 Thread Daniel Kulp
On Friday, August 19, 2011 5:24:30 PM Blue Diamond wrote:
> *Please let me know if this issue was resolved in later versions of 2.3.x.*
> 
> I am facing a socket issue with CXF 2.3.0. My service request takes around
> 10 minutes so I have set my socket time out on the client side. But when the
> service sends response, I see the following exception on the client side.
> No exception on the server.

All I can suggest is to try 2.4.2 and see if it is fixed.   There have been a 
ton of fixes since 2.3.0 so it may already be fixed.

Dan



> 
> NOTE: This problem only occurs when WS-Security is engaged. On plain web
> service endpoints it works fine even with large delays.
> 
> Client uses Dispatch model.
> 
> Aug 19, 2011 5:09:32 PM org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNING: Interceptor for {
> http://ns.ca.com/catalyst/node}NodeX509#{http://cxf.apache.org/jaxws/dispatc
> h}Invokehas thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> ...
> Caused by: java.net.SocketException: SocketException invoking
> http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from
> server
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39) at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27) at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(H
> TTPConduit.java:1995) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCond
> uit.java:1980) at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInter
> ceptor.handleMessage(MessageSenderInterceptor.java:62) ... 10 more
> Caused by: java.net.SocketException: Unexpected end of file from server
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
> at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
> at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
> .java:1064) at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
> Internal(HTTPConduit.java:2102) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
> (HTTPConduit.java:2071) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCond
> uit.java:1925) ... 13 more
> [com.ca.ucf.remote.ws.client.WSModuleProxy] : Could not add SOAP header
> elements
> javax.xml.ws.WebServiceException: Could not send Message.
> at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:244)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:339)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:218)
> at com.ca.garan10.test.RunTest.main(RunTest.java:11)
> Caused by: java.net.SocketException: SocketException invoking
> http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from
> server
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39) at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27) at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(H
> TTPConduit.java:1995) at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCond
> uit.java:1980) at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInter
> ceptor.handleMessage(MessageSenderInterceptor.java:62) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
> .java:247) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:300)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:332)
> ... 4 more
> Caused by: java.net.SocketException: Unexpected end of file from server
> at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
> at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> at sun.net.www.http.HttpClient.pa

Re: Caused by: java.net.SocketException: Unexpected end of file from server

2011-08-19 Thread Blue Diamond
And the issue looks to be related to this:

Aug 19, 2011 3:46:02 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging

WARNING: Interceptor for {
http://ns.ca.com/catalyst/node}NodeX509#{http://www.w3.org/2010/08/ws-tra}Gethas
thrown exception, unwinding now

org.apache.cxf.binding.soap.SoapFault: Problem writing SAAJ model to stream

  at
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(
*SAAJOutInterceptor.java:211*)

  at
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(
*SAAJOutInterceptor.java:167*)

  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
PhaseInterceptorChain.java:247*)

  at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(*
OutgoingChainInterceptor.java:77*)

  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
PhaseInterceptorChain.java:247*)

  at org.apache.cxf.transport.ChainInitiationObserver.onMessage(*
ChainInitiationObserver.java:113*)

  at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(*
JettyHTTPDestination.java:311*)

  at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(
*JettyHTTPDestination.java:280*)

  at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(*
JettyHTTPHandler.java:72*)

  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(*
ContextHandler.java:922*)

  at org.eclipse.jetty.server.handler.ContextHandler.doScope(*
ContextHandler.java:860*)

  at org.eclipse.jetty.server.handler.ScopedHandler.handle(*
ScopedHandler.java:117*)

  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(*
ContextHandlerCollection.java:247*)

  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(*
HandlerWrapper.java:114*)

  at org.eclipse.jetty.server.Server.handle(*Server.java:348*)

  at org.eclipse.jetty.server.HttpConnection.handleRequest(*
HttpConnection.java:596*)

  at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(*
HttpConnection.java:1066*)

  at org.eclipse.jetty.http.HttpParser.parseNext(*HttpParser.java:897*)

  at org.eclipse.jetty.http.HttpParser.parseAvailable(*
HttpParser.java:218*)

  at org.eclipse.jetty.server.HttpConnection.handle(*
HttpConnection.java:426*)

  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(*
SelectChannelEndPoint.java:510*)

  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(*
SelectChannelEndPoint.java:34*)

  at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(*
SelectChannelEndPoint.java:40*)

  at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(*
QueuedThreadPool.java:450*)

  at java.lang.Thread.run(*Thread.java:619*)

Caused by: *com.ctc.wstx.exc.WstxIOException*: null

  at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(*
BaseStreamWriter.java:511*)

  at org.apache.cxf.staxutils.StaxUtils.copy(*StaxUtils.java:474*)

  at org.apache.cxf.staxutils.StaxUtils.copy(*StaxUtils.java:452*)

  at
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(
*SAAJOutInterceptor.java:206*)

  ... 24 more

Caused by: *org.eclipse.jetty.io.EofException*

  at org.eclipse.jetty.server.HttpOutput.write(*HttpOutput.java:148*)

  at org.eclipse.jetty.server.HttpOutput.write(*HttpOutput.java:92*)

  at org.apache.cxf.io.AbstractWrappedOutputStream.write(*
AbstractWrappedOutputStream.java:46*)

  at com.ctc.wstx.io.UTF8Writer.write(*UTF8Writer.java:139*)

  at com.ctc.wstx.sw.BufferingXmlWriter.flushBuffer(*
BufferingXmlWriter.java:1103*)

  at com.ctc.wstx.sw.BufferingXmlWriter.writeRaw(*
BufferingXmlWriter.java:255*)

  at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(*
BufferingXmlWriter.java:543*)

  at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(*
BaseStreamWriter.java:509*)

  ... 27 more

On Fri, Aug 19, 2011 at 5:24 PM, Blue Diamond  wrote:

> *Please let me know if this issue was resolved in later versions of 2.3.x.
> *
>
> I am facing a socket issue with CXF 2.3.0. My service request takes around
> 10 minutes so I have set my socket time out on the client side. But when the
> service sends response, I see the following exception on the client side. No
> exception on the server.
>
> NOTE: This problem only occurs when WS-Security is engaged. On plain web
> service endpoints it works fine even with large delays.
>
> Client uses Dispatch model.
>
> Aug 19, 2011 5:09:32 PM org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNING: Interceptor for {
> http://ns.ca.com/catalyst/node}NodeX509#{http://cxf.apache.org/jaxws/dispatch}Invokehas
>  thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> ...
> Caused by: java.net.SocketException: SocketException invoking
> http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from
> serve