Hi David,
looks like your client (web browser?) closes the connection before
reading the entire response from the server.
WBR,
Alexey.
On 23.09.13 15:01, Hou, Chunxiao wrote:
>
> Hi there,
>
> I saw this exception (see below) which happens randomly after I
> upgraded Jersey to 2.3. Can someone please help to take a look? Many
> Thanks.
>
> I am running embedded Grizzly server --
>
> *Grizzly http Server:*
>
> ResourceConfig rc = new PackagesResourceConfig(RESOURCE_DIR);
>
> rc.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, true);
>
> httpServer = GrizzlyServerFactory.createHttpServer(BASE_URI, rc);
>
> *Resource:*
>
> public abstract class AbstractGetRiskResource {
>
> private static final Logger logger =
> LoggerFactory.getLogger(AbstractGetRiskResource.class);
>
> @GET
>
> public Response getMessage(@Context final UriInfo
> uriInfo, @Context HttpHeaders hh) {
>
> String requestUri = uriInfo.getRequestUri().toString();
>
> ...
>
> }
>
> Thanks,
>
> David
>
> Sep 23, 2013 5:51:06 PM
> org.glassfish.jersey.server.ServerRuntime$Responder writeResponse
>
> SEVERE: An I/O error has occurred while writing a response message
> entity to the container output stream.
>
> _org.glassfish.jersey.server.internal.process.MappableException_:
> _java.io.IOException_: An established connection was aborted by the
> software in your host machine
>
> at
> org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(_MappableExceptionWrapperInterceptor.java:96_)
>
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(_WriterInterceptorExecutor.java:149_)
>
> at
> org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(_MessageBodyFactory.java:1139_)
>
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(_ServerRuntime.java:562_)
>
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(_ServerRuntime.java:357_)
>
> at
> org.glassfish.jersey.server.ServerRuntime$Responder.process(_ServerRuntime.java:347_)
>
> at
> org.glassfish.jersey.server.ServerRuntime$1.run(_ServerRuntime.java:258_)
>
> at org.glassfish.jersey.internal.Errors$1.call(_Errors.java:271_)
>
> at org.glassfish.jersey.internal.Errors$1.call(_Errors.java:267_)
>
> at org.glassfish.jersey.internal.Errors.process(_Errors.java:315_)
>
> at org.glassfish.jersey.internal.Errors.process(_Errors.java:297_)
>
> at org.glassfish.jersey.internal.Errors.process(_Errors.java:267_)
>
> at
> org.glassfish.jersey.process.internal.RequestScope.runInScope(_RequestScope.java:318_)
>
> at
> org.glassfish.jersey.server.ServerRuntime.process(_ServerRuntime.java:235_)
>
> at
> org.glassfish.jersey.server.ApplicationHandler.handle(_ApplicationHandler.java:983_)
>
> at
> org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(_GrizzlyHttpContainer.java:330_)
>
> at
> org.glassfish.grizzly.http.server.HttpHandler$1.run(_HttpHandler.java:209_)
>
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(_AbstractThreadPool.java:565_)
>
> at
> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(_AbstractThreadPool.java:545_)
>
> at java.lang.Thread.run(Unknown Source)
>
> Caused by: _java.io.IOException_: An established connection was
> aborted by the software in your host machine
>
> at sun.nio.ch.SocketDispatcher.write0(_Native Method_)
>
> at sun.nio.ch.SocketDispatcher.write(Unknown Source)
>
> at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
>
> at sun.nio.ch.IOUtil.write(Unknown Source)
>
> at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
>
> at
> org.glassfish.grizzly.nio.transport.TCPNIOTransport.flushByteBuffer(_TCPNIOTransport.java:1251_)
>
> at
> org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter.write0(_TCPNIOAsyncQueueWriter.java:107_)
>
> at
> org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(_AbstractNIOAsyncQueueWriter.java:273_)
>
> at
> org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(_AbstractNIOAsyncQueueWriter.java:180_)
>
> at
> org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter.write(_AbstractNIOAsyncQueueWriter.java:70_)
>
> at
> org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleWrite(_TCPNIOTransportFilter.java:128_)
>
> at
> org.glassfish.grizzly.filterchain.TransportFilter.handleWrite(_TransportFilter.java:191_)
>
> at
> org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(_ExecutorResolver.java:111_)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(_DefaultFilterChain.java:288_)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(_DefaultFilterChain.java:206_)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(_DefaultFilterChain.java:136_)
>
> at
> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(_DefaultFilterChain.java:114_)
>
> at
> org.glassfish.grizzly.ProcessorExecutor.execute(_ProcessorExecutor.java:77_)
>
> at
> org.glassfish.grizzly.filterchain.FilterChainContext.write(_FilterChainContext.java:853_)
>
> at
> org.glassfish.grizzly.filterchain.FilterChainContext.write(_FilterChainContext.java:822_)
>
> at
> org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(_OutputBuffer.java:1011_)
>
> at
> org.glassfish.grizzly.http.io.OutputBuffer.write(_OutputBuffer.java:676_)
>
> at
> org.glassfish.grizzly.http.server.NIOOutputStreamImpl.write(_NIOOutputStreamImpl.java:83_)
>
> at
> org.glassfish.jersey.message.internal.CommittingOutputStream.write(_CommittingOutputStream.java:227_)
>
> at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
>
> at sun.nio.cs.StreamEncoder.implWrite(Unknown Source)
>
> at sun.nio.cs.StreamEncoder.write(Unknown Source)
>
> at java.io.OutputStreamWriter.write(Unknown Source)
>
> at java.io.BufferedWriter.flushBuffer(Unknown Source)
>
> at java.io.BufferedWriter.write(Unknown Source)
>
> at
> org.glassfish.jersey.message.internal.ReaderWriter.writeToAsString(_ReaderWriter.java:191_)
>
> at
> org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeToAsString(_AbstractMessageReaderWriterProvider.java:129_)
>
> at
> org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(_StringMessageProvider.java:99_)
>
> at
> org.glassfish.jersey.message.internal.StringMessageProvider.writeTo(_StringMessageProvider.java:59_)
>
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(_WriterInterceptorExecutor.java:243_)
>
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(_WriterInterceptorExecutor.java:230_)
>
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(_WriterInterceptorExecutor.java:149_)
>
> at
> org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(_JsonWithPaddingInterceptor.java:103_)
>
> at
> org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(_WriterInterceptorExecutor.java:149_)
>
> at
> org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(_MappableExceptionWrapperInterceptor.java:88_)
>
> ... 19 more
>
> This email is confidential and subject to important disclaimers and
> conditions including on offers for the purchase or sale of securities,
> accuracy and completeness of information, viruses, confidentiality,
> legal privilege, and legal entity disclaimers, available at
> http://www.jpmorgan.com/pages/disclosures/email.
>