Tomcat error

I get the following error when I access a jsp from my web application
installed in tomcat. The idea debug console shows that tomcat has been
started successfully.
org.apache.jasper.JasperException: Unable to compile class for JSPerror:
Invalid class file format in
E:\j2sdk1.4.0_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor
version '48.0' is too recent for this tool to understand.

E:\JavaSoftware\idea3\system\tomcat_tempest_af370611\work\Standalone\localho
st\tempest\shell\jsp\index$jsp.java:0: Class java.lang.Object not found in
class javax.servlet.GenericServlet.
package org.apache.jsp;
^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:176)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va: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:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
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.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
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:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
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
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
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:
1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
at java.lang.Thread.run(Thread.java:536)




2 comments
Comment actions Permalink


"Arjuna Chala" <achala@bellsouth.net> wrote in message
news:ajn4rg$k6h$1@is.intellij.net...

I get the following error when I access a jsp from my web application
installed in tomcat. The idea debug console shows that tomcat has been
started successfully.
org.apache.jasper.JasperException: Unable to compile class for JSPerror:
Invalid class file format in
E:\j2sdk1.4.0_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor
version '48.0' is too recent for this tool to understand.

>
>
E:\JavaSoftware\idea3\system\tomcat_tempest_af370611\work\Standalone\localho

st\tempest\shell\jsp\index$jsp.java:0: Class java.lang.Object not found in
class javax.servlet.GenericServlet.
package org.apache.jsp;
^
2 errors

>

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at

>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe

rvlet.java:176)
at

>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

va: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:853)
at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

FilterChain.java:247)
at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

ain.java:193)
at

>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:243)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
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.ja

va:190)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
at

>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2

46)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
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:2347)
at

>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180

)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
at

>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.

java:170)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
at

>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170

)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
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

:174)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
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:

1027)
at

>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125

)
at java.lang.Thread.run(Thread.java:536)

>
>
>
>


0
Comment actions Permalink

Similar problem was posted to eap-bugs newsgroup.
There was a post from Vilya Harvey with the solution

The citation:

This happens when you try to use the JDK 1.4 classes for compiling with a
1.3 or earlier compiler. This is not often a problem because javac is
generally pretty good about figuring out which rt.jar it should be using;
the problems mainly seem to occur when it is invoked from some other program
(as with jspc/jasper in Tomcat).

A possible cause is that you are running Tomcat under JDK 1.3 but your
JAVA_HOME environment variable is pointing at your JDK 1.4 installation.
There are two fairly simple solutions to this, if that _is the case:
1) Change your JAVA_HOME to the location of your JDK 1.3 installation; or
2) Run Tomcat under JDK 1.4 instead.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"

"Arjuna Chala" <achala@bellsouth.net> wrote in message
news:ajn4rg$k6h$1@is.intellij.net...

I get the following error when I access a jsp from my web application
installed in tomcat. The idea debug console shows that tomcat has been
started successfully.
org.apache.jasper.JasperException: Unable to compile class for JSPerror:
Invalid class file format in
E:\j2sdk1.4.0_01\jre\lib\rt.jar(java/lang/Object.class). The major.minor
version '48.0' is too recent for this tool to understand.

>
>
E:\JavaSoftware\idea3\system\tomcat_tempest_af370611\work\Standalone\localho

st\tempest\shell\jsp\index$jsp.java:0: Class java.lang.Object not found in
class javax.servlet.GenericServlet.
package org.apache.jsp;
^
2 errors

>

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at

>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe

rvlet.java:176)
at

>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja

va: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:853)
at

>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

FilterChain.java:247)
at

>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

ain.java:193)
at

>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:243)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
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.ja

va:190)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
at

>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2

46)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
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:2347)
at

>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180

)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
at

>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.

java:170)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
at

>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170

)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

64)
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

:174)
at

>
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)
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:

1027)
at

>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125

)
at java.lang.Thread.run(Thread.java:536)

>
>
>
>


0

Please sign in to leave a comment.