java.util.concurrent.TimeoutException如何解决?

时间:2014-03-10 06:01:00

标签: java-7 glassfish-4

当我使用com.jsos.image.ImageServlet显示图像时    我的glassfish 4.0服务器触发此错误,请给我解决方案。

这在java 6glassfish 3

中完美运行

我的stacktrash是:

   [2014-03-07T08:32:38.465-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=20 _ThreadName=http-listener-1(2)] [timeMillis: 1394199158465] [levelValue: 900] [[
      StandardWrapperValve[fileServlet]: Servlet.service() for servlet fileServlet threw exception
    java.io.IOException: java.util.concurrent.TimeoutException
        at org.glassfish.grizzly.utils.Exceptions.makeIOException(Exceptions.java:81)
        at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:958)
        at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:682)
        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 utilities.MobileVideoServlet.copy(MobileVideoServlet.java:401)
        at utilities.MobileVideoServlet.processRequest(MobileVideoServlet.java:298)
        at utilities.MobileVideoServlet.doGet(MobileVideoServlet.java:74)
        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.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
        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.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        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.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
        at java.lang.Thread.run(Thread.java:744)
    Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(FutureTask.java:201)
        at org.glassfish.grizzly.http.io.OutputBuffer.blockAfterWriteIfNeeded(OutputBuffer.java:951)
        ... 36 more
    ]]

1 个答案:

答案 0 :(得分:3)

此问题已在最新版本的GlassFish中修复,您可以看到here

更新到GlassFish 4.0.1,这反过来可以解决您的问题。 您可以从here.

下载更新的GlassFish