You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by deniz <de...@gmail.com> on 2012/01/13 06:26:53 UTC
JDK Version Mismatch
Hi All,
I have a problem with tomcat 6.0.35. Basically I am getting this error each
time I try to access my webapp from the browser:
org.apache.jasper.JasperException: javax.servlet.ServletException:
java.lang.UnsupportedClassVersionError: xxx/xxx/xxxManager : Unsupported
major.minor version 51.0 (unable to load class xxx.xxx.xxxManager)
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
The machine on which tomcat runs, uses jdk 1.7. And while creating my war
file on eclipse, it uses jdk 1.6. I made some search on other places and
found out that this version mismatch is the reason. However, there is no
java ee 7, so i cant create my war file with the new version, by using
eclipse...
my question: is there any other way to overcome this issue with tomcat? or i
have to install java 1.6 to the machine that i run tomcat?
thank you in advance, for your helps
--
View this message in context: http://tomcat.10.n6.nabble.com/JDK-Version-Mismatch-tp3666636p3666636.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [OT] JDK Version Mismatch
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
deniz,
(Marking OT because this has nothing to do with Tomcat)
On 1/13/12 2:25 AM, deniz wrote:
> I have created and compiled my class files with jdk 1.7 and then
> put them in a jar and included that jar file in my webapp project
> on jdk 1.6 which i create jsp files. is this a feasible way to fix
> the problem?
When compiling, use whatever your compiler's version of the "-target"
parameter for javac: you can target a particular (older) JVM and your
class files will be readable by them.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8XODUACgkQ9CaO5/Lv0PCONwCgnfMih1JSvXvhcR1oCtkaiUJk
bNYAn1UiXt0xV037JP096reWQM1W9GaL
=O0b4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JDK Version Mismatch
Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message -----
> From: deniz <de...@gmail.com>
> To: users@tomcat.apache.org
> Cc:
> Sent: Thursday, January 12, 2012 11:25 PM
> Subject: RE: JDK Version Mismatch
>
> Hello Chuck,
>
> thank you for your response, I have changed tomcat env to 1.7 so i am not
> getting the error right now.
>
> i have another question about the same issue but i am not quite sure if this
> is the right place...
>
> so right now eclipse doesnt support jdk 1.7 and you need to download a
> maintenance version to use it. it really works well except something: you
> cant create webapps with it. so to overcome the problem what should i do? I
> have tried something and till now it "seems" okay... I have created
> and
> compiled my class files with jdk 1.7 and then put them in a jar and included
> that jar file in my webapp project on jdk 1.6 which i create jsp files. is
> this a feasible way to fix the problem? or should i change the classes in my
> webapp folder under tomcat manually, with jdk 1.7 compiled classes?
>
> thank you in advance again...
>
Or use an IDE that fully supports JDK 7.
. . . . just my two cents.
/mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JDK Version Mismatch
Posted by deniz <de...@gmail.com>.
Hello Chuck,
thank you for your response, I have changed tomcat env to 1.7 so i am not
getting the error right now.
i have another question about the same issue but i am not quite sure if this
is the right place...
so right now eclipse doesnt support jdk 1.7 and you need to download a
maintenance version to use it. it really works well except something: you
cant create webapps with it. so to overcome the problem what should i do? I
have tried something and till now it "seems" okay... I have created and
compiled my class files with jdk 1.7 and then put them in a jar and included
that jar file in my webapp project on jdk 1.6 which i create jsp files. is
this a feasible way to fix the problem? or should i change the classes in my
webapp folder under tomcat manually, with jdk 1.7 compiled classes?
thank you in advance again...
--
View this message in context: http://tomcat.10.n6.nabble.com/JDK-Version-Mismatch-tp3666636p3666730.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JDK Version Mismatch
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: deniz [mailto:denizdurmus87@gmail.com]
> Subject: JDK Version Mismatch
> Unsupported major.minor version 51.0
Looks like your diagnosis is backwards. Version 51.0 is from a class built with JDK 7, trying to be loaded by an older version of the JVM - which means your Tomcat is actually running on JRE/JDK 6, and you built your .war file (or some component therein) with JDK 7.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org