Home > Archive > Java Help > November 2005 > Unsupported major.minor version 49.0
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Unsupported major.minor version 49.0
|
|
| hclugano@hotmail.com 2005-11-01, 8:02 am |
| I never compiled a tomcat - project before.. Now I have to do it. I'm
using Eclipse and importet the Project into the workspace. When I try
to start the JSP-Application with my Browser, I get an error message
like this:
javax.servlet.ServletException: org/apache/jsp/index_jsp (Unsupported
major.minor version 49.0)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Thanks for Help,
Greets Thomas
| |
| Andrew Thompson 2005-11-01, 8:02 am |
| hclugano@hotmail.com wrote:
> I never compiled a tomcat - project before.. Now I have to do it. I'm
> using Eclipse and importet the Project into the workspace. When I try
> to start the JSP-Application with my Browser, I get an error message
> like this:
>
> javax.servlet.ServletException: org/apache/jsp/index_jsp (Unsupported
> major.minor version 49.0)
This is because some of the classes were compiled for a version
later than what you are trying to support.
Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
In that case, configure your IDE to handle 1.6 classes and
everything should work.
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> Thanks for Help,
[ It is common to ask a question when requesting help -
it clarifies what the problem is, and what you hope to
get from the reply. ]
| |
| Ross Bamford 2005-11-01, 7:00 pm |
| On Tue, 01 Nov 2005 11:04:32 -0000, Andrew Thompson
<seemysites@www.invalid> wrote:
> Since Java 1.5 is class version 48.0, I guess 49.0 is 1.6.
>
49.0 is Java 1.5.0 - Java 1.6 has 50.0 (and more 'compatible' format
changes)
As you say, Sounds to me like the Eclipse build is set up to compile to
Java 5 and Tomcat is running with a prior VM (most likely 1.4.2, class
format 48.0).
However, doesn't it seem strange that this is an error on a JSP -
shouldn't Tomcat compile them on the fly? Assuming OP didn't precompile
them in Eclipse too, I guess...
--
Ross Bamford - rosco@roscopeco.remove.co.uk
| |
| Andrew Thompson 2005-11-01, 7:00 pm |
| Ross Bamford wrote:
> On Tue, 01 Nov 2005 11:04:32 -0000, Andrew Thompson
> <seemysites@www.invalid> wrote:
>
....[color=darkred]
> 49.0 is Java 1.5.0 - Java 1.6 has 50.0 (and more 'compatible' format
> changes)
That's odd. I checked the class version against the Java
version as reported by the VM itself.
<http://www.physci.org/pc/property.j...a.class.version>
Here that retuns..
java.version - 1.5.0-beta
java.class.version - 48.0
What does it read in your browser?
(shrugs vaguely) I am not that 'up' on class version
numbers, just curious, really.
| |
| Ross Bamford 2005-11-01, 7:00 pm |
| On Tue, 01 Nov 2005 17:05:56 -0000, Andrew Thompson
<seemysites@www.invalid> wrote:
> Ross Bamford wrote:
>
> ...
>
> That's odd. I checked the class version against the Java
> version as reported by the VM itself.
> <http://www.physci.org/pc/property.j...a.class.version>
>
> Here that retuns..
> java.version - 1.5.0-beta
> java.class.version - 48.0
>
> What does it read in your browser?
>
> (shrugs vaguely) I am not that 'up' on class version
> numbers, just curious, really.
Just tried it with both, and I get:
java.version - 1.5.0_05
java.class.version - 49.0
and
java.version - 1.6.0_ea
java.class.version - 50.0
I notice you're on a 1.5.0 beta however, so it's probably the case that
someone forgot to change a version number at that point. IIRC until quite
recently Package.getSpecificationVersion on java.* in 1.5 was returning
1.4, because someone forgot to roll the number in rt.jar's manifest, so it
wouldn't be the first time... ;)
AFAIK 49.0 introduces new attributes and whatnot for generic signatures,
together with some new modifier flag bits (bridge methods, varargs, so
on). 50.0 will introduce (probably among other things) StackMapTable
attributes like those used by the CLDC verifier, which are now being
introduced in SE.
--
Ross Bamford - rosco@roscopeco.remove.co.uk
| |
| Andrew Thompson 2005-11-01, 7:00 pm |
| Ross Bamford wrote:
> ...IIRC until
> quite recently Package.getSpecificationVersion on java.* in 1.5 was
> returning 1.4, because someone forgot to roll the number in rt.jar's
> manifest, so it wouldn't be the first time... ;)
SNAFU? I am dened, mostly because that
explanation is so ..plausible. :-(
[ Thanks for the extra info. BTW ]
| |
| Ross Bamford 2005-11-01, 7:00 pm |
| On Tue, 01 Nov 2005 19:28:17 -0000, Andrew Thompson
<seemysites@www.invalid> wrote:
> Ross Bamford wrote:
>
>
> SNAFU? I am dened, mostly because that
> explanation is so ..plausible. :-(
>
:)) The devil's always been in the details ...
--
Ross Bamford - rosco@roscopeco.remove.co.uk
| |
| Myron Turner 2005-11-26, 9:57 pm |
| This is not a tomcat question but it is still about the unsupported
version problem.
I have an applet that I have been running from one server but when I
moved it over to a second server, all the same class files, I got the
unsupported version error off the new server inf Firefox though not in
IE. After a lot of fooling around, I was finally able to get Firefox
to import 1.5 and the . error stopped.
Also, the applet downloaded from the old server runs on MAC Safari but
not when dowloaded from the new server.
The old sever uses apache 1.3 but the new one uses 2.0. Would that
make a difference?
Mhyron Turner
|
|
|
|
|