It's all about the answers!

Ask a question

Get java.lang.UnsupportedClassVersionError running PlainJava


Guowei Jim Hu (1.0k910353) | asked Sep 29 '10, 12:45 p.m.
We are running RTC as WAS application server on Linux.

After moving from RTC 2.0 to 2.0.0.2 and then iFix04, we found that our little Java application using PlainJava API stop working.

The compile is ok:
/home/isbot/JazzPlainJavaClient-2.0.0.2
bash-3.2$ /opt/IBM/WebSphere/AppServer1/java/bin/javac -extdirs . snippets/*.java -Xlint:unchecked
snippets/Snippet4.java:47: warning: unchecked conversion
found : java.util.Iterator
required: java.util.Iterator<com>
for (Iterator<IComponent> it = components.iterator(); it.hasNext();) {
^
snippets/Snippet4.java:58: warning: unchecked conversion
found : java.util.Map
required: java.util.Map<java>
children = configuration.childEntriesForRoot(null);
^
snippets/Snippet4.java:60: warning: unchecked conversion
found : java.util.Map
required: java.util.Map<java>
children = configuration.childEntries(parent, null);
^
3 warnings


But when run one of the snippets, we got version offset error:

bash-3.2$ /opt/IBM/JazzTeamServer2002/server/jre/bin/java -Djava.ext.dirs=/opt/IBM/JazzTeamServer2002/server/jre/lib/ext:snippets:. snippets.Snippet1.class
The java class could not be loaded. java.lang.UnsupportedClassVersionError: (snippets/Snippet1) bad major version at offset=6



What do I miss? Please help.
Do I need the full SDK ? I only downloaded the libs so far.

2 answers



permanent link
Guowei Jim Hu (1.0k910353) | answered Sep 30 '10, 10:57 a.m.
Figured this out now.

Apparently there is a major version mismatch between the WAS JVM (1.6.0) and RTC 2.0.0.2.iFix04 JVM (1.5.0) on our server. As we compiled the java program with WAS's java compiler, and then tried o run it with RTC's JVM.

This worked on 2.0 but not anymore, apparently because the upgrade of WAS on our server.

bash-3.2$ /opt/IBM/JazzTeamServer2002/server/jre/bin/java -version
java version "1.5.0"

bash-3.2$ /opt/IBM/WebSphere/AppServer1/java/jre/bin/java -version
java version "1.6.0"

I can run my java program now with WAS's JVM.

permanent link
tom lee (4) | answered Oct 04 '10, 3:09 a.m.
i don`t know what to say , on my website i don`t have java errors , if i get something i will get back to you

Dressup Games

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.