Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Get java.lang.UnsupportedClassVersionError running PlainJava

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.

0 votes



2 answers

Permanent link
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.

0 votes


Permanent link
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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 29 '10, 12:45 p.m.

Question was seen: 10,419 times

Last updated: May 18 '14, 5:59 p.m.

Confirmation Cancel Confirm