"org.apache.jasper.JasperException: Unable to compile class for JSP" message - beginner jsp/tomcat developer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kevin_Parkinson
Posted On:   Monday, September 5, 2005 10:44 AM

Hello jGurus: I have just installed Apache Tomcat 4.0 on Windows XP. The server is working fine; when I enter http://localhost:8080 it brings me to the tomcat-docs. When I run the servlet examples they all run fine, but I am having a problem understanding why each JSP is giving the same exception ( I have even tried setting up my own directory inside ROOT, but still the same ) - I am a beginner and cannot possible begin to think of what is wrong. It is long, but here is the exception report: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:558) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSer   More>>

Hello jGurus:

I have just installed Apache Tomcat 4.0 on Windows XP. The server is working fine; when I enter http://localhost:8080 it brings me to the tomcat-docs. When I run the servlet examples they all run fine, but I am having a problem understanding why each JSP is giving the same exception ( I have even tried setting up my own directory inside ROOT, but still the same ) - I am a beginner and cannot possible begin to think of what is wrong.



It is long, but here is the exception report:



org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:558)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)
at java.lang.Thread.run(Unknown Source)



Root Cause:


java.lang.NumberFormatException: For input string: " Invalid class file format in E"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:280)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1005)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098)
at java.lang.Thread.run(Unknown Source

   <<Less

Re: "org.apache.jasper.JasperException: Unable to compile class for JSP" message - beginner jsp/tomcat developer

Posted By:   Kevin_Parkinson  
Posted On:   Tuesday, September 6, 2005 09:04 AM


     I came to my own solution ( aren't those always the best ) so I thought I would share it:



     What I did was uninstalled everything - I think I had version 4.0 of both the JRE and JSDK, so I upgraded to 5.0...I had 4.0 of Tomcat and instead installed 5.0 )...this certainly fixed the problem.



     When I downloaded the new version of NetBeans, it turned out that it needed another version of the JSDK - version 1.4.2 - so I had to download that. I must say, the newest version of NetBeans is very nice to work with!



toe deep in java,
Kevin Parkinson


About | Sitemap | Contact