4

struts2 を使用して Excel ファイルをエクスポートしています。小さいファイルで問題なく動作します。大きなファイルで次のエラーが発生します。このエラーが発生するのはなぜですか? ファイルのサイズが大きすぎませんか?

2012-12-01 09:51:29.689::WARN:  Committed before 500 Unable to show problem report: java.lang.IllegalStateException: STREAM
2012-12-01 09:51:29.690::WARN:  /strutsDemo/process/excel: 
java.lang.IllegalStateException: Committed
    at org.mortbay.jetty.Response.resetBuffer(Response.java:853)
    at org.mortbay.jetty.Response.reset(Response.java:832)
    at org.mortbay.jetty.Response.sendError(Response.java:220)
    at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:801)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
    at org.mortbay.jetty.Server.handle(Server.java:269)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
    at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
2012-12-01 09:51:29.691::WARN:  /strutsDemo/file/export
java.lang.IllegalStateException: Committed
    at org.mortbay.jetty.Response.resetBuffer(Response.java:853)
    at org.mortbay.jetty.Response.reset(Response.java:832)
    at org.mortbay.jetty.Response.sendError(Response.java:220)
    at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:801)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
    at org.mortbay.jetty.Server.handle(Server.java:269)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
    at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
    at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

これが私のアクション構成です:

  <result name="success" type="stream">
    <param name="contentType">application/vnd.ms-excel</param>
    <param name="inputName">excelStream</param>
    <param name="contentDisposition">attachment;fileName="${fileName}"</param>
    <param name="bufferSize">2048</param>
  </result>
  <result name="invalid.token">/error.jsp</result>
</action>
4

1 に答える 1