Glassfish / Struts Web应用程序:找不到抛出IOException的原因

时间:2015-12-21 10:19:37

标签: java postgresql struts2 glassfish

我有一个抛出IOException的Java Web应用程序(Connection已关闭)。不幸的是,我无法找到问题的原因/来源(因此,我无法提供最小的代码示例)。我不能在开发环境中重现异常,在生产环境中它会被定期抛出(例如,50个登录用户:平均每10到20分钟抛出一次,有时更常见)。

如何确定此问题的原因(似乎它与使用的库有关,可能是某些配置问题)?

以下是设置:

  • 使用Struts 2和JDBC(Postgres 9)的Java应用程序库:

    • ASM-5.0.2.jar

    • ASM-公地5.0.2.jar

    • ASM-树5.0.2.jar

    • 公地BeanUtils的-1.8.0.jar

    • 公地集合-3.2.1.jar

    • 公地消化器-2.0.jar

    • 公地文件上传-1.3.1.jar

    • 公地-IO-2.2.jar

    • 公地琅2.4.jar

    • 公地lang3-3.2.jar

    • 共享记录-1.1.3.jar

    • 的freemarker-2.3.22.jar

    • 了Javassist-3.11.0.GA.jar

    • javax.servlet-api.jar(3.1.0版)

    • 的junit-4.7.jar

    • OGNL-3.0.6.jar

    • ojdbc14.jar的

    • 的PostgreSQL-9.4-1201.jdbc41.jar

    • struts2的核 - 2.3.24.1.jar

    • struts2的瓷砖-插件-2.3.24.1.jar

    • 瓦片-API-2.0.6.jar

    • 瓦片核-2.0.6.jar

    • 瓦片-JSP-2.0.6.jar

    • XWork的核 - 2.3.24.1.jar

  • 部署在Glassfish服务器4.1.1上

这是堆栈跟踪:

 [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [[
      StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
    java.io.IOException: Connection is closed
            at org.glassfish.grizzly.nio.NIOConnection.assertOpen(NIOConnection.java:432)
            at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:653)
            at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
            at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
            at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
            at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:2199)
            at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1085)
            at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:568)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
            at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
            at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:413)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
            at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
            at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
            at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
            at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
            at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
            at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
            at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
            at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
            at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
            at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
            at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
            at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
            at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
            at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
            at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
            at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
            at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: java.io.IOException: Locally closed
    ]]

0 个答案:

没有答案