servlet CXFServlet的Servlet.service()引发了异常

时间:2016-01-28 07:59:56

标签: java spring web-services tomcat jax-rs

我正在使用部署在tomcat上的JaxRS webservice + spring应用程序。

<servlet>
      <servlet-name>CXFServlet</servlet-name>
      <servlet-class> org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet 
    </servlet-class>

我有时一直面临这个问题,但是当我重新启动Web应用程序时,没有这些例外情况可以正常工作。

SEVERE: Servlet.service() for servlet CXFServlet threw exception
java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
        at sun.nio.ch.IOUtil.read(IOUtil.java:206)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
        at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:125)
        at org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelector.java:156)
        at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:229)
        at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:210)
        at org.apache.coyote.http11.InternalNioInputBuffer.readSocket(InternalNioInputBuffer.java:571)
        at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:868)
        at org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:892)
        at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
        at org.apache.coyote.http11.InternalNioInputBuffer.doRead(InternalNioInputBuffer.java:830)
        at org.apache.coyote.Request.doRead(Request.java:428)
        at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:298)
        at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
        at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:313)
        at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162)
        at com.fusionone.filter.BufferedRequestWrapper.<init>(RequestResponseLoggerFilter.java:256)
        at com.fusionone.filter.RequestResponseLoggerFilter.doFilter(RequestResponseLoggerFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.fusionone.filter.RequestLogFilter.doFilter(RequestLogFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Jan 27, 2016 12:25:25 PM org.apache.catalina.core.StandardWrapperValve invoke

有人请帮我理解这个问题。

0 个答案:

没有答案