tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quintin Beukes" <quin...@last.za.net>
Subject Re: Vicious Bug in the JSP code?
Date Thu, 10 Jul 2008 14:59:58 GMT
I figured it might be related to the Nio protocol I did, so I changed
it to "HTTP/1.1". What a surprise!!

It all comes down after the JSP is invoked, so my perception is that
it's related to a bug in the JSP code. Jasper?

Any advice would be greatly appreciated, and I'm willing to fix it
myself if I can get some advice/guidance as this problem is major for
us at the moment. To revert to the old ways will take too long, and
we'll loose a lot of time spent in design for current and future
changes, which are all based around our moving forward from the JSP
templates.

java.lang.NullPointerException
  at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:737)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
  at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
  at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:761)
  at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:127)
  at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)
  at org.apache.coyote.Response.doWrite(Response.java:560)
  at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
  at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325)
  at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:242)
  at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
  at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
  at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
  at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
  at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
  at org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:191)
  at org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:134)
  at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:439)
  at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:143)
  at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:119)
  at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326)
  at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342)
  at org.apache.jasper.runtime.JspWriterImpl.print(JspWriterImpl.java:468)
  at templates.ValuesTag.doEndTag(ValuesTag.java:95)
  at org.apache.jsp.templates.search_jsp._jspx_meth_tmpl_005fvalues_005f0(search_jsp.java:331)
  at org.apache.jsp.templates.search_jsp._jspService(search_jsp.java:71)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
  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:654)
  at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
  at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
  at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
  at templates.JSPTemplate.loadTemplate(JSPTemplate.java:64)
  at web.Search.replyBody(Search.java:255)
  at web.Search.doGet(Search.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


On Thu, Jul 10, 2008 at 4:23 PM, Quintin Beukes <quintin@last.za.net> wrote:
> Hey,
>
> Can someone please advise me on this one. I am at a total loss as to
> what is going on here.
>
> Since we search engine's deployed our output to be a JSP page, random
> pages are failing. I would literally refresh the page, and it works
> every time, and then suddenly, WAM. Also, not the same error every
> time. We are using a custom tag library, but it doesn't fail in here.
> For isntance, the following exception is because "context" is null.
> Can someone explain to me WHY context would be null?
> java.lang.NullPointerException
>        at org.apache.catalina.connector.Request.setAttribute(Request.java:1424)
>        at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503)
>        at templates.JSPTemplate.loadTemplate(JSPTemplate.java:63)
>        at web.Search.replyBody(Search.java:255)
>        at web.Search.doGet(Search.java:73)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>        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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        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:263)
>        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
>        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>        at java.lang.Thread.run(Thread.java:619)
>
>
> Also this. I know that I didn't request the output stream or writer
> from the response object. I NEVER do. I only do a
> requestDispacter().forward(req,resp) to the JSP apge.
> java.lang.IllegalStateException: Cannot forward after response has
> been committed
>        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
>        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
>        at templates.JSPTemplate.loadTemplate(JSPTemplate.java:64)
>        at web.Search.replyBody(Search.java:255)
>        at web.Search.doGet(Search.java:73)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>        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.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        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:263)
>        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:887)
>        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:696)
>        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2009)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>        at java.lang.Thread.run(Thread.java:619)
>
>
> --
> Quintin Beukes
>



-- 
Quintin Beukes

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message