KeithFrohn Report post Posted April 23, 2012 Hi. I am doing server side export of charts and it works fine but I get a server warning with a wrapped IllegalStateException stack trace. Does anyone know why the FCPExporter servlet would do this? I get this when exporting to JPG, PNG or PDF. I am using the J2EE FCPExporter. Here is the log output. Apr 23, 2012 4:56:48 PM com.fusioncharts.exporter.generators.ImageGenerator getChartImage INFO: Creating the Chart image Apr 23, 2012 4:56:48 PM com.fusioncharts.exporter.generators.ImageGenerator getChartImage INFO: Image created successfully [WARN] /FCExporter java.lang.IllegalStateException: STREAM at org.mortbay.jetty.Response.getWriter(Response.java:585) at com.fusioncharts.exporter.resources.FCExporter_IMG.exportOutput(FCExporter_IMG.java:259) at com.fusioncharts.exporter.servlet.FCExporter.doPost(FCExporter.java:192) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Share this post Link to post Share on other sites
Guest Bindhu Report post Posted April 24, 2012 Hi, Welcome to the FusionCharts Forum Thank you for the post. Can you please provide us the stripped down project to test from our side ? Share this post Link to post Share on other sites
Rajeev Johari Report post Posted April 26, 2012 body { background: #FFFFFF; margin: 0px; padding: 4px; font-family: arial, verdana, tahoma, sans-serif; font-size: 9pt; } font { font-size: 9px; } font { font-size: 13px; } font { font-size: 15px; } font { font-size: 17px; } font { font-size: 21px; } font { font-size: 26px; } font { font-size: 36px; } Hi, Welcome to the FusionCharts Forum Thank you for the post. Can you please provide us the stripped down project to test from our side ? Hi, I am also using fusion chart in my J2EE application. and i am also getting the error. please see the error log on my console. Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects INFO: Creating PDF specific objects. Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects INFO: Gathering data for each page Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator getBitmapData24 INFO: Parsing image data Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator getBitmapData24 INFO: Image data parsed successfully Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator compress INFO: Compressing the image data Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator compress INFO: Image data compressed Apr 26, 2012 10:00:47 AM com.fusioncharts.exporter.generators.PDFGenerator getPDFObjects INFO: PDF data created successfully Apr 26, 2012 10:00:47 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet FCExporter threw exception java.lang.IllegalStateException : getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter( Response.java:611) at org.apache.catalina.connector.ResponseFacade.getWriter( ResponseFacade.java:198) at com.fusioncharts.exporter.resources.FCExporter_PDF.exportOutput( FCExporter_PDF.java:184) at com.fusioncharts.exporter.servlet.FCExporter.doPost( FCExporter.java:192) at javax.servlet.http.HttpServlet.service( HttpServlet.java:710) at javax.servlet.http.HttpServlet.service( HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke( ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest( ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward( ApplicationDispatcher.java:302) at com..webapp.filter.PortalFilter.doForward( PortalFilter.java:242) at com.webapp.filter.PortalFilter.doFilter( PortalFilter.java:118) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at com.webapp.filter.ErrorFilter.doFilterInternal( ErrorFilter.java:36) at com..webapp.filter.ErrorFilter.doFilter( ErrorFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at com.webapp.filter.CacheControlFilter.doFilter( CacheControlFilter.java:102) 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:191) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) java.lang.IllegalStateException : getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter( Response.java:611) at org.apache.catalina.connector.ResponseFacade.getWriter( ResponseFacade.java:198) at com.fusioncharts.exporter.resources.FCExporter_PDF.exportOutput( FCExporter_PDF.java:184) at com.fusioncharts.exporter.servlet.FCExporter.doPost( FCExporter.java:192) at javax.servlet.http.HttpServlet.service( HttpServlet.java:710) at javax.servlet.http.HttpServlet.service( HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke( ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest( ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward( ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward( ApplicationDispatcher.java:302) at com..webapp.filter.PortalFilter.doForward( PortalFilter.java:242) at com.webapp.filter.PortalFilter.doFilter( PortalFilter.java:118) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at com.webapp.filter.ErrorFilter.doFilterInternal( ErrorFilter.java:36) at com.webapp.filter.ErrorFilter.doFilter( ErrorFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at com.webapp.filter.CacheControlFilter.doFilter( CacheControlFilter.java:102) 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:191) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489) Share this post Link to post Share on other sites
some_one Report post Posted May 8, 2012 I have the same error. The server side export (with exportAction=download) works fine, but i still get exceptions thrown. SEVERE: Servlet.service() for servlet FCExporter threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:610) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198) at com.fusioncharts.exporter.resources.FCExporter_PDF.exportOutput(FCExporter_PDF.java:184) at com.fusioncharts.exporter.servlet.FCExporter.doPost(FCExporter.java:192) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 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:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:883) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:722) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2214) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Share this post Link to post Share on other sites
Guest Bindhu Report post Posted May 9, 2012 Hi, Can you please provide us the stripped down project to test from our side ? Without which it would be tough for us to find out the cause. Share this post Link to post Share on other sites