We seem to have been able to get the error stack traces by adding the init-param "fork" to the JSP servlet, with a value of "false". Any idea why this works?

Noel

Noel Rappin wrote:

There is a root cause, but it doesn't have the error info...

java.lang.ClassNotFoundException: org.apache.jsp.foo_jsp
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:209)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:497)


at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:150)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:195)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


I was also able to replicate Tim's stack trace on a windows machine... the relevant part is here..

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)

at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)

at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)


at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


It looks like in Tim's case, the compilation called at JspServletWrapper:190 triggers an error, that my system is swallowing. My system apparently makes it to JspServletWrapper:195, where it then seems to be looking for the compiled jsp class file, which it's not finding -- only then does my system show the stack trace. The question, I guess, is why is my system swallowing the javac DefaultErrorHandler? I guess I'll dig into the code.

Thanks,

Noel

Shapira, Yoav wrote:

Howdy,
This isn't the full stack trace: please post the full one with the Root
Cause.

Yoav Shapira
Millennium ChemInformatics




-----Original Message-----
From: Noel Rappin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 4:59 PM
To: Tomcat Users List
Subject: Re: JSP Compiler output?

I replicated this experiment exactly in my environment.  Tomcat 4.1.24,
Linux, JSDK 1.4.1_01.  Is it a Linux thing?

Here's my stack trace in localhost:

org.apache.jasper.JasperException: Unable to compile class for JSP
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java

:500


)
at
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrappe

r.ja


va:150)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j

ava:


195)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295

)


at

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

By the way, I really appreciate your time in helping with this.

Noel

Tim Funk wrote:



You should get something somewhere. For example ... With 4.1.24
(win2k, jdk1.3, but 1.4 is the same result), I have a file called
foo.jsp (at /) with the contents:
<% more cowbell %>

My error screen is attached. In the logs
(localhost_log.2003-06-17.txt) I get:
2003-06-17 16:34:06 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
   [javac] Since fork is true, ignoring compiler setting.
   [javac] Compiling 1 source file
   [javac] Since fork is true, ignoring compiler setting.
   [javac]


C:\opt\jakarta\tomcat4.1.24\work\Standalone\localhost\_\foo_jsp.java:41:


';' expected
   [javac]  more cowbell
   [javac]              ^
   [javac]


C:\opt\jakarta\tomcat4.1.24\work\Standalone\localhost\_\foo_jsp.java:41:


cannot resolve symbol
   [javac] symbol  : class more
   [javac] location: class org.apache.jsp.foo_jsp
   [javac]  more cowbell
   [javac]  ^
   [javac] 2 errors



at


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH

andl


er.java:130)


...





-Tim


Noel Rappin wrote:




Okay. I did a clean install of tomcat. I placed a compilation

error


in one of the example JSPs. I am now seeing this in the logs:

* catalina.out: start/stop messages
* localhost_examples: a stack trace saying that there was a
JasperException: unable to compile class for JSP
* localhost_log: messages about servlet loading.

What I don't see is a message saying something useful about the
compilation error -- like "Compile failed on line 10, statement
expected" or some such.  Are those messages just not generated?

Noel

----------------------------------------------------------------------

--


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to