Hi André,

> -----Original Message-----
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Tuesday, July 12, 2011 9:25 PM
> 
> Can you take a part of this setup out of the equation ?
> 
> For example, at the moment you have
> 
> browser <-> IIS <-> isapi_redir. <-> AJP Connector:8019 <->
> Tomcat+webapp
> 
> Could you eliminate the IIS + Isapi_redir part, having Tomcat listen on
> port 80/HTTP, like
> this :
> 
> browser <-> HTTP Connector:80 <-> Tomcat+webapp
> 
> ?
> 
> or like this, by using Apache httpd instead of IIS :
> 
> browser <-> Apache <-> mod_jk <-> AJP Connector:8019 <-> Tomcat+webapp
> 
> This may help pinpointing where the problem is, since you mentioned
> earlier that you can
> reproduce the problem by pressing F5 in Firefox.
> 

Unfortunately, I can't replace IIS with Apache or direct Tomcat HTTP
connector, as that webapp is on a public server where also other websites
are hosted, using IIS.
But perhaps I can see if I can reproduce the problem in a virtual machine.

Please note that I could only reproduce the problems that occurred before
switching from AJP-APR to AJP-BIO. There I could reproduce them by pressing
and holding F5 in Firefox for some seconds, but after I switched to AJP-BIO,
that didn't worked. The error message I wrote in the last mail did I see
when I read the isapi logs today.


Today I also got another strange exception in Tomcat (I don't know if it has
anything to do with the AJP errors):

13.07.2011 00:13:51 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet [hauptSeite.HauptServlet] in
context with path [] threw exception
java.lang.IllegalStateException: Cannot create a session after the response
has been committed
        at
org.apache.catalina.connector.Request.doGetSession(Request.java:2734)
        at
org.apache.catalina.connector.Request.getSession(Request.java:2244)
        at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:89
9)
        at common.Common2.getSession(Common2.java:102)
        at hauptSeite.HauptServlet.doThings(HauptServlet.java:136)
        at hauptSeite.HauptServlet.doGet(HauptServlet.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:304)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:210)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:240)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:164)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:462)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100
)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:118)
        at
org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionM
anagerValve.java:172)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:292)
        at
org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.j
ava:143)
        at
org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.j
ava:129)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:
309)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
        at java.lang.Thread.run(Thread.java:662)

This appeared some minutes ago. I also have seen this Exception some times
on JSP pages, but not on a normal Servlet (for JSP pages, the stack trace
contained "at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:
65)" and that was before any custom JSP code).

This above error is from a WebApp that I use for hosting images. The stack
trace seems to indicate that a response has been committed before a session
is created, however I absolutely never send any response before creating a
session in that Servlet (I call response.getWriter() or
response.getOutputStream several lines after I call request.getSession(true)
). 


Hmm, could it be that the Java ImageIO is re-using OutputStreams after
calling ImageIO.write(img, "PNG", out), so that I'm getting such a
IllegalStateException? (I think I read somewhere that Tomcat is recycling
OutputStream objects)
Maybe that could also explain the AJP errors I got.


Regards,

Konstantin Preißer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to