tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Glanville" <jay.glanvi...@naturalconvergence.com>
Subject RE: Problems running pre-compiled JSP classes when in subdirectories
Date Wed, 07 Jan 2004 14:04:43 GMT
Here is the exception in it's entirety, as recorded in the log file:

2003-12-15 20:11:25 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
javax.servlet.ServletException: org/apache/jsp/index_jsp (wrong name:
org/apache/jsp/dir/index_jsp)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
	at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.NoClassDefFoundError: org/apache/jsp/index_jsp (wrong name:
org/apache/jsp/dir/index_jsp)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
	at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:215)
	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.compiler.Compiler.isOutDated(Compiler.java:440)
	at
org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)
	at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:471)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va: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)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
	at java.lang.Thread.run(Thread.java:534)


--
Jay Glanville


> -----Original Message-----
> From: Edson Alves Pereira [mailto:eapereira@panamericano.com.br] 
> Sent: Wednesday, January 07, 2004 9:43 AM
> To: 'Tomcat Users List'
> Subject: RE: Problems running pre-compiled JSP classes when 
> in subdirectories
> 
> 
> 	Show us the exception how it appears to you.
> 
> > ----------
> > De: 	Jay Glanville[SMTP:jay.glanville@naturalconvergence.com]
> > Responder: 	Tomcat Users List
> > Enviada: 	quarta-feira, 7 de janeiro de 2004 10:20
> > Para: 	'Tomcat Users List'
> > Assunto: 	Problems running pre-compiled JSP classes when in
> > subdirectories
> > 
> > I originally posted this question back in mid-December, but without 
> > any responses.  In the hopes that someone will have a hit or a 
> > solution, I'm reposting the question again.
> > 
> > 
> > I'm having a problem when I try to use my pre-compiled JSP files: I 
> > receive a NoClassDefFoundError exception.  Here's what I'm doing ...
> > 
> > I have pre-compiled my JSP classes using the JspC plugin 
> from ant.  My 
> > files compile without complaint.  However, when I try to access the 
> > files through tomcat, I receive some NoClassDefFoundError 
> exceptions. 
> > But these exceptions only occur when I'm accessing JSPs in the 
> > subdirectories off of the web root.
> > 
> > Here's my application's background.  I have two files:
> >   <WEBROOT>/index.jsp
> >   <WEBROOT>/dir/index.jsp
> > The contents of the two files are just simple HTML.  I 
> precompiled the 
> > JSP using the JspC ant target, then compiled using javac.  
> Finally, I 
> > created a context pointing the work directory to the location of my 
> > java and class files.  When I tried to access the first file
> > (http://localhost/context/index.jsp) everything went fine.  
> However, 
> > when I tried to access the second file 
> > (http://localhost/context/dir/index.jsp), I received the 
> > NoClassDefFoundError.  The log file looks like this:
> > 
> > 2003-12-15 20:11:25 StandardWrapperValve[jsp]: 
> Servlet.service() for 
> > servlet jsp threw exception
> > javax.servlet.ServletException: org/apache/jsp/index_jsp 
> (wrong name:
> > org/apache/jsp/dir/index_jsp)
> > 	at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> > 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         [deleted ...]
> > ----- Root Cause -----
> > java.lang.NoClassDefFoundError: org/apache/jsp/index_jsp 
> (wrong name:
> > org/apache/jsp/dir/index_jsp)
> > 	at java.lang.ClassLoader.defineClass0(Native Method)
> > 	at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
> > 	at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
> > 	at
> > 
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.
> java:215)
> >         [deleted]
> > 
> > Now, according to my research on this mailing list, the 
> most frequent 
> > reason for a NoClassDef error is capitalization.  However, 
> this isn't 
> > the case in my situation as the two package names are completely
> > different: org/apache/jsp/index_jsp vs. 
> org/apache/jsp/dir/index_jsp.
> > 
> > I'm using Tomcat 4.1.29.
> > 
> > Any suggestions on how to alleviate this situation would be greatly 
> > appreciated.
> > 
> > Thanks
> > 
> > JDG
> > 
> > PS: I should also point out that I have tried the 
> recommended way of 
> > precompiling my JSP by converting to servlets 
> > 
> (http://jakarta.apache.org/tomcat/tomcat-4.1->
doc/jasper-howto.html#Web
> > %2
> > 0Application%20Compilation).  However, I have a problem with this
> > method: it makes it that much harder to patch my 
> application.  With the
> > non-servlet approach, I just simply deliver the modified 
> JSP files. With
> > the servlet approach, I need to deliver the classes, plus 
> ensure that
> > the web.xml is correct (add new entries, remove old ones, 
> modify where
> > needed), plus restart the context.
> > 
> > 
> > 
> > 
> > --
> > Jay Glanville
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 


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


Mime
View raw message