cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Exception(Unexpected end of file from server) of CXF
Date Tue, 12 Jul 2011 03:48:59 GMT
On 7/8/11 6:34 PM, xuhb wrote:
> Recently I always encounter a "Unexpected end of file from server" Exception at CXF client
side.  it seems this exception is caused by  the CXF Serverside has unexcepted release the
http connection ;
>   I tried some effort to to use a simple test case to regenerate such a exception; Following
is a simple test case which will cause such a exception.
> keypoint of the test case:
> 1)MTOM enabled;
> 2)Using Jetty-Transport at serverside, and using SUN JDK's http client at client side;
> 3)the service logical is simple: first consume all attachment and close it; then wait
for a long time (about 10 miniutes);
> In practice, there is no such a service which will block for so long time, but in the
simple test case, I must use such a long time to force such a exception occurs;
What kinds of response does your client expect?

> 4)set the client side 's receiveTime to a infinite time(almost) to avoid receive time
out exception. then the client will block to wait service , but after about 7 minutes a ""Unexpected
end of file from server"  Exception will raised at client side;
> Other key points I have tried:
> 1)At first I guess maybe this is the jetty-server's problem: I guess it will release
connection  silently while the servlet-handler execute too long time;
>    But unfortunately it 's not so .
> Because I tried another simple test case, which doesnt generate such a exception . The
only difference is: there is no attachment in xml data; Also the service will wait a very
long time( 10minutes, 20minutes I have tried) . And the client will blocking util service

Did you have a chance to catch the under layer TCP transport between the 
server and client. It's easy to tell the difference of your two test 
case if you catch the packages between the client and server.
> Ps: the stack of the Exception is :
> org.apache.cxf.interceptor.Fault: Could not send Message.
>   at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
> ...
> Caused by: SocketException invoking http://localhost:9000/service/moreattachmentsrpcliteral:
Unexpected end of file from server
> ...
>   at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(
>   at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
> ...
> Caused by: Unexpected end of file from server
>   at
>   at
>   at
>   at
>   at
>   at
>   at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
>   at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(
>   at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
>   ... 35 more

Blog: (English)
Twitter: willemjiang
Weibo: willemjiang

View raw message