javajakarta-eeantmaven-ant-tasksjboss-4.0.x

Java - Ant build and deploy to JBoss fails due to UnsupportedClassVersionError


I am trying to build and deploy a project to the JBoss deploy folder with the bundeled Maven-Ant script from Eclipse but it always ends up with JBoss logging the following:

nested throwable: (java.lang.UnsupportedClassVersionError: Bad version number in .class file)

The used software for this project is following:

In Eclipse under Window>Preferences I added the JDK to the Java>Installed JREs list and set it to default too just in case. Under Project>Properties>Java Compiler I have set the compliance level to 1.4 and have also played with the other compliance setting without any success.

Also, JBoss is set to use the exact same JDK which is 1.4_03 from the Oracle website. Odd is that Eclipse tends to identify it as version 1.5. For example on the Java Compiler page it says:

When selectiong 1.4 compliance, make sure to have a compatible JRE installed and activated (currently 1.5).

Can anybody give some advice where could I have gone wrong?

Thanks in advance!


Solution

  • The JDK I used turned out to be the wrong version. I got in touch with one of the previous developers and he said it definitely should work with JDK 1.5 update 9 and that made all the difference. I got past that ambiguous error message. Sorry for the mess, guys!