geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin Sun (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (GERONIMO-1084) Trade web primitive--PingServlet2Include failed: getWriter() has already been called for this response
Date Mon, 17 Oct 2005 18:08:46 GMT
Trade web primitive--PingServlet2Include failed:  getWriter() has already been called for this
response
-------------------------------------------------------------------------------------------------------

         Key: GERONIMO-1084
         URL: http://issues.apache.org/jira/browse/GERONIMO-1084
     Project: Geronimo
        Type: Bug
  Components: Tomcat  
    Versions: 1.0-M5    
 Environment: Windows + Tomcat
    Reporter: Lin Sun


Deployed daytrader and found out day/trader/servlet/PingServlet2Include didn't work, and the
exceptions threw:

Error: PingServlet2Include.doGet(...): general exception
		 
		 java.lang.IllegalStateException: getWriter() has already been called for this response
java.lang.IllegalStateException: getWriter() has already been called for this response
		 at org.apache.catalina.connector.Response.getOutputStream(Response.java:565)
		 at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:171)
		 at org.apache.geronimo.samples.daytrader.web.prims.PingServlet2Include.doGet(PingServlet2Include.java:61)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
		 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
		 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
		 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
		 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
		 at org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53)
		 at org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
		 at org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60)
		 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
		 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
		 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
		 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
		 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
		 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
		 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
		 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
		 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
		 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
		 at java.lang.Thread.run(Thread.java:568)
java.lang.IllegalStateException: getWriter() has already been called for this response
		 at org.apache.catalina.connector.Response.getOutputStream(Response.java:565)
		 at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:171)
		 at org.apache.geronimo.samples.daytrader.web.prims.PingServlet2Include.doGet(PingServlet2Include.java:61)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
		 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
		 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
		 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
		 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
		 at org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53)
		 at org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)
		 at org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60)
		 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
		 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
		 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
		 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
		 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
		 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
		 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
		 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
		 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
		 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
		 at java.lang.Thread.run(Thread.java:568)
java.lang.NullPointerException
		 at org.apache.jsp.error_jsp._jspService(org.apache.jsp.error_jsp:96)
		 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
		 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
		 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
		 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
		 at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
		 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
		 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
		 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
		 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
		 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
		 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
		 at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:362)
		 at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:283)
		 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
		 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
		 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
		 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
		 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
		 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
		 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
		 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
		 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
		 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
		 at java.lang.Thread.run(Thread.java:568)

In org.apache.geronimo.samples.daytrader.web.prims.PingServlet2Include.java file, I tried
to replace 

                       ServletOutputStream out = res.getOutputStream();
with
                        java.io.PrintWriter out = res.getWriter();
and rebuilt daytrader.    I was able to get the primitive working afterwards.   However, I
don't think changing the code is the right approach since it worked with other web containers.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message