Exception thrown: com.ibm.etools.webservice.deploy.core.WebserviceXMLException:
Compilation error in *.jarProblem: An EAR file created and
exported from the workspace fails to deploy on WebSphere® Application Server 6.1.x
resulting in the following error: class file has wrong version
49.0, should be 48.0 Please remove or make sure it appears in the correct
subdirectory of the classpath
Cause: When creating a project,
the default JDK compiler is JDK 5.0. The WebSphere Application Server 6.1.x
JDK level is 1.4. Java 1.4 creates class files labeled with version 48.0. Java 1.5
creates class files labeled with version 49.0. Java 1.4 cannot run class files labeled
with version 49.0.
Solution: Recompile the project containing the class
using JDK 1.4 compiler by doing the following:
- Right click on the project and select Properties > Project
Facets.
- Click Add/Remove Project Facets.
- Double-click Version for the second Java entry.
- Select 1.4 from the drop-down list.
- Click Finish > OK.
- Right click the project and select Properties > Java Compiler.
You will see the complier compliance level has been changed to 1.4 7.
Export the compiled EAR file and deploy on WebSphere Application Server 6.1.x
- the deployment should be successful.