Bad version number in .class file

141 views
Skip to first unread message

kito

unread,
Jul 24, 2008, 3:58:44 PM7/24/08
to Google Web Toolkit
I'm currently working on a project, integrating GWT with Spring. I
just started with some tests with the GWT-RPC and everything works.
I've completely separated the GWT and Server-side Spring code in two
different projects. In order to improve the development experience I
wrote an Ant script that compiles and deploys my server-code to the
GWT integrated Tomcat webserver.
When I start the GWT Shell, everything starts up and seems to work
except at one class it gives me a stack-trace saying something about a
bad version number in .class file. Here is just a part of the stack-
trace:
...
Caused by: java.lang.UnsupportedClassVersionError: Bad version number
in .class file
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1255)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1189)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:
1634)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:
860)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1307)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1189)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:229)

I've set the compiler compliance level within Eclipse to 1.5 with a
JRE version 1.5.0_05 for both, the GWT and the Spring project. If I
deploy it to the normal Tomcat webserver (not the embedded inside the
GWT shell), everything works smoothly. Can somebody give me a hint
what could be wrong? What Java version does the embedded Tomcat server
inside the GWT shell use??

Thanks,
Juri
http://blog.js-development.com

kito

unread,
Jul 25, 2008, 4:49:02 PM7/25/08
to Google Web Toolkit
Sorry for my previous post. I found the solution.
The problem was that my GWT project inside Eclipse had the comiler
compliance set to 6.0.
Now I'm able to deploy my server application inside the GWT
development shell which allows me to comfortably develop my
application.

As soon as I'm more comfortable, I'll write some article or post
explaining in depth how to make GWT work with Spring.
So keep an eye on my blog :)

Juri
http://blog.js-development.com

Rauf Issa

unread,
Jul 26, 2008, 6:36:46 AM7/26/08
to Google Web Toolkit
This is usually due to using a compiler that is not bytecode
compatible with the other jars in the project.

Rauf
Reply all
Reply to author
Forward
0 new messages