Re: Need help debugging JSP compilation failure

2011-07-06 Thread Pid
On 06/07/2011 21:54, Mike Spreitzer wrote:
 I install a fresh copy of the latest Tomcat (7.0.16), and deploy my WAR by 
 copying it into Tomcat's webapps/.  Then I startup Tomcat and direct my 
 browser to my web app's welcome page --- which is a JSP.  The compilation 
 of the JSP fails but with very little information.  All I get is the line 
 number of the JSP where something went wrong; I get that in Tomcat's 
 logs/localhost.{date}.log.  How can I get more information about what is 
 going wrong?

What else do you get a line number and what?

Did you precompile the JSPs in the app?
If not, the work directory contains the .java file from the parsed JSP.


p


 I am running Tomcat on MacOS 10.6.8 on my MacBook Pro (Intel), with 
 
 $ java -version
 java version 1.6.0_26
 Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
 Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
 
 Thanks,
 Mike Spreitzer
 




signature.asc
Description: OpenPGP digital signature


Re: Need help debugging JSP compilation failure

2011-07-06 Thread Mike Spreitzer
I just got a pointer into my original JSP (not the Java version); see copy 
below.  I also looked in my $CATALINA_HOME/work, and found only 
directories, no files (at any depth) --- see listing below.  I did not 
precompile my JSP.

Here is the complaint from logs/localhost.{date}.log:

Jul 6, 2011 3:49:36 PM org.apache.catalina.core.StandardWrapperValve 
invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path 
[/rippledriver] threw exception [Unable to compile class for JSP: 

An error occurred at line: 10 in the jsp file: /index.jsp
Unhandled exception type Exception
7: title.../title
8: /head
9: body
10: %!static Driver driver = new RealDriverImpl();%
11: %
12: String p;
13: if (null != (p = request.getParameter(runpause)))


Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 10 in the jsp file: /index.jsp
Unhandled exception type Exception
7: title.../title
8: /head
9: body
10: %!static Driver driver = new RealDriverImpl();%
11: %
12: String p;
13: if (null != (p = request.getParameter(runpause)))


Stacktrace:
at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at 
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:601)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: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.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Here is my futile search for something in work/ (dates don't all match 
because I shutdown before sending my original complaint, then started up 
again and reproduced the problem to see if that would give me something to 
look at; Tomcat is running right now):

$ find work -exec ls -ld \{\} \;
drwxr-xr-x  3 mspreitz  staff  102 Jul  6 15:31 work
drwxr-xr-x  3 mspreitz  staff  102 Jul  6 15:31 work/Catalina
drwxr-xr-x  8 mspreitz  staff  272 Jul  6 17:53 work/Catalina/localhost
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 work/Catalina/localhost/_
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 
work/Catalina/localhost/docs
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 
work/Catalina/localhost/examples
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 
work/Catalina/localhost/host-manager
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 
work/Catalina/localhost/manager
drwxr-xr-x  2 mspreitz  staff  68 Jul  6 17:53 
work/Catalina/localhost/rippledriver

Thanks,
Mike Spreitzer




From:   Pid p...@pidster.com
To: Tomcat Users List users@tomcat.apache.org
Date:   07/06/2011 05:14 PM
Subject:Re: Need help debugging JSP compilation failure



On 06/07/2011 21:54, Mike Spreitzer wrote:
 I install a fresh copy of the latest Tomcat (7.0.16), and deploy my WAR 
by 
 copying it into Tomcat's webapps/.  Then I startup Tomcat and direct my 
 browser

Re: Need help debugging JSP compilation failure

2011-07-06 Thread Mark Thomas
On 06/07/2011 22:59, Mike Spreitzer wrote:
 I just got a pointer into my original JSP (not the Java version); see copy 
 below.  I also looked in my $CATALINA_HOME/work, and found only 
 directories, no files (at any depth) --- see listing below.  I did not 
 precompile my JSP.
 
 Here is the complaint from logs/localhost.{date}.log:
 
 Jul 6, 2011 3:49:36 PM org.apache.catalina.core.StandardWrapperValve 
 invoke
 SEVERE: Servlet.service() for servlet [jsp] in context with path 
 [/rippledriver] threw exception [Unable to compile class for JSP: 
 
 An error occurred at line: 10 in the jsp file: /index.jsp
 Unhandled exception type Exception

What more information could you possibly want to debug this? The error
is Unhandled exception type Exception at line 10 in your JSP.

 10: %!static Driver driver = new RealDriverImpl();%

And the method signature for the default constructor for RealDriverImpl
is what? My money is on:
public RealDriverImpl() throws Exception

and that is an unhandled exception which is not valid Java.

Mark



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



Re: Need help debugging JSP compilation failure

2011-07-06 Thread Mike Spreitzer
Oh, I see, it was a level confusion.  I thought I was being told about an 
Exception in the compilation process rather than in my source.

Thanks,
Mike Spreitzer