You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric B <mi...@gmail.com> on 2008/04/09 00:35:09 UTC
"class file has wrong version"
Hi, all.
I've got a problem that may be with one of three different components, but
the error message is appearing in Tomcat, so I'm posting it here. :-)
I've got two machines, one for Development, and one that acts as a
Development Server:
Dev:
Windows XP Pro
Ant 1.6.5
JDK 1.4.2_17 (Used for building application)
JDK 1.6.0_05 (Used for running Eclipse)
All environment variables set to use the 1.4.2 JDK
Server:
Windows 2000 Pro
JDK 1.4.2_17
Tomcat 4.1.30 (Runs as a service, using the "server" version of jvm.dll")
All environment variables set to use the 1.4.2 JDK
I can build my project on the Dev machine with no problems, but when I ship
the .war over to the Server and attempt to run it, I get the following
error:
An error occurred at line: 24 in the jsp file: /ivr/dialogs/get_dnis.jsp
Generated servlet error:
bad class file: C:\jdk142_17\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of
the classpath.
Now, I've tried putting a target="1.4" entry into the <javac> tag in
my build file, but it's still happening. Is there something wrong
with my Tomcat setup, or am I just completely clueless with Ant?
Thanks for the help!
Eric B
Re: "class file has wrong version"
Posted by Eric B <mi...@gmail.com>.
Hi, Len.
Thanks for the tip; this has been somewhat of a noodle buster for me, thus
far. I confirmed that the "Server" actually has a 1.4 and a 1.6 JDK, but
there's nothing for 1.3.
I managed to fix the problem, however, with a little bit of tweaking. I
reinstalled Tomcat on the Server, and modified my build.xml on my
development machine with "target" and "source" set equal to 1.4. Now it's
running like a dream.
It feels like my fix should not have worked, but I'm not going to complain
too loudly about a functioning system. :-)
Regards,
Eric B
On Tue, Apr 8, 2008 at 7:22 PM, Len Popp <le...@gmail.com> wrote:
> The error message "class file has wrong version 48.0, should be 47.0"
> indicates that you're trying to run Java 1.4 code in a Java 1.3 JVM. I
> know you said your dev server is running JDK 1.4.2_17 but apparently
> that's not really the case.
>
> I wasn't able to find an official list of class file version numbers
> from Sun, but here are a couple of 3rd-party references:
> http://www.rgagnon.com/javadetails/java-0544.html
> http://en.wikipedia.org/wiki/Class_(file_format)<http://en.wikipedia.org/wiki/Class_%28file_format%29>
> --
> Len
>
> On Tue, Apr 8, 2008 at 6:35 PM, Eric B <mi...@gmail.com>
> wrote:
> > Hi, all.
> >
> > I've got a problem that may be with one of three different components,
> but
> > the error message is appearing in Tomcat, so I'm posting it here. :-)
> >
> > I've got two machines, one for Development, and one that acts as a
> > Development Server:
> >
> > Dev:
> > Windows XP Pro
> > Ant 1.6.5
> > JDK 1.4.2_17 (Used for building application)
> > JDK 1.6.0_05 (Used for running Eclipse)
> > All environment variables set to use the 1.4.2 JDK
> >
> > Server:
> > Windows 2000 Pro
> > JDK 1.4.2_17
> > Tomcat 4.1.30 (Runs as a service, using the "server" version of
> jvm.dll")
> > All environment variables set to use the 1.4.2 JDK
> >
> > I can build my project on the Dev machine with no problems, but when I
> ship
> > the .war over to the Server and attempt to run it, I get the following
> > error:
> > An error occurred at line: 24 in the jsp file:
> /ivr/dialogs/get_dnis.jsp
> >
> > Generated servlet error:
> > bad class file: C:\jdk142_17\jre\lib\rt.jar(java/lang/Object.class)
> > class file has wrong version 48.0, should be 47.0
> > Please remove or make sure it appears in the correct subdirectory of
> > the classpath.
> >
> > Now, I've tried putting a target="1.4" entry into the <javac> tag in
> > my build file, but it's still happening. Is there something wrong
> > with my Tomcat setup, or am I just completely clueless with Ant?
> >
> > Thanks for the help!
> > Eric B
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: "class file has wrong version"
Posted by Len Popp <le...@gmail.com>.
The error message "class file has wrong version 48.0, should be 47.0"
indicates that you're trying to run Java 1.4 code in a Java 1.3 JVM. I
know you said your dev server is running JDK 1.4.2_17 but apparently
that's not really the case.
I wasn't able to find an official list of class file version numbers
from Sun, but here are a couple of 3rd-party references:
http://www.rgagnon.com/javadetails/java-0544.html
http://en.wikipedia.org/wiki/Class_(file_format)
--
Len
On Tue, Apr 8, 2008 at 6:35 PM, Eric B <mi...@gmail.com> wrote:
> Hi, all.
>
> I've got a problem that may be with one of three different components, but
> the error message is appearing in Tomcat, so I'm posting it here. :-)
>
> I've got two machines, one for Development, and one that acts as a
> Development Server:
>
> Dev:
> Windows XP Pro
> Ant 1.6.5
> JDK 1.4.2_17 (Used for building application)
> JDK 1.6.0_05 (Used for running Eclipse)
> All environment variables set to use the 1.4.2 JDK
>
> Server:
> Windows 2000 Pro
> JDK 1.4.2_17
> Tomcat 4.1.30 (Runs as a service, using the "server" version of jvm.dll")
> All environment variables set to use the 1.4.2 JDK
>
> I can build my project on the Dev machine with no problems, but when I ship
> the .war over to the Server and attempt to run it, I get the following
> error:
> An error occurred at line: 24 in the jsp file: /ivr/dialogs/get_dnis.jsp
>
> Generated servlet error:
> bad class file: C:\jdk142_17\jre\lib\rt.jar(java/lang/Object.class)
> class file has wrong version 48.0, should be 47.0
> Please remove or make sure it appears in the correct subdirectory of
> the classpath.
>
> Now, I've tried putting a target="1.4" entry into the <javac> tag in
> my build file, but it's still happening. Is there something wrong
> with my Tomcat setup, or am I just completely clueless with Ant?
>
> Thanks for the help!
> Eric B
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org