tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: java.lang.ClassNotFoundException with small jsp file
Date Wed, 31 Dec 2008 01:39:58 GMT
Is there any error messages before this in the logs that might offer any
further insight?  When you say the class file exists, do you mean there
is both hello_jsp.java and hello_jsp.class?  Or is the .class file
missing.  Lastly, are you sure the user tomcat is running as has read
privilege to the file?

--David

John Byrne wrote:
> Hello all,
>
>  
>
> I was wondering whether any of you could help me out with a problem I'm
> having.  I'm getting a java.lang.ClassNotFoundException when trying to run a
> jsp application.  The class file exists and is under: 
>
> C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 6.0\work\Catalina\localhost\HelloWorld\org\apache\jsp
>
>  
>
> But it looks like Tomcat isn't finding it.  I'm getting other exceptions too
> (all of them are below):
>
> org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable
> to load class for JSP
>
>  
> org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> a:156)
>
>  
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 29)
>
>  
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>
>         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
> root cause 
>
> org.apache.jasper.JasperException: Unable to load class for JSP
>
>  
> org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
>
>  
> org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> a:144)
>
>  
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 29)
>
>  
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>
>         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
> root cause 
>
> java.lang.ClassNotFoundException: org.apache.jsp.Hello_jsp
>
>         java.net.URLClassLoader$1.run(Unknown Source)
>
>         java.security.AccessController.doPrivileged(Native Method)
>
>         java.net.URLClassLoader.findClass(Unknown Source)
>
>  
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
>
>  
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
>
>  
> org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
>
>  
> org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.jav
> a:144)
>
>  
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> 29)
>
>  
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>
>         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>
>  
>
> When I installed tomcat I didn't set any CATALINA_HOME variable.  Was I
> supposed to do this?
>
> I also can't find the log entries for this error.  I've looked under the
> logs directory of the Tomcat installation but there are only logs from
> previous days.
>
>  
>
> Thank you for all of your help.
>
>  
>
> John
>
>
>   


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


Mime
View raw message