I was using WebSphere Allication Server version 7.0.0.13 in deploying my application. The war was build using Ant version 1.8.2 to build the war and ear file. When I am installing my application through WebSphere, I hit the following error:
The EAR file could be corrupt and/or incomplete. Make sure that the
application is at a compatible Java(TM) Platform, Enterprise Edition
(Java EE) level for the current version of WebSphere(R) Application
Server.com.ibm.websphere.management.application.client.AppDeploymentException
[Root exception is org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DeploymentDescriptorLoadException:
dd_in_ear_load_EXC_]
May I know what cause the problem? Or did I miss configure something in Ant script? Below are the ANT script for compiling the WAR and EAR.
<target name="compilewar" description="generating war">
<war destfile="${dist.path}/WebApp.war" webxml="${source.path}/mywebapp/src/main/webapp/WEB-INF/web.xml">
<webinf dir="${source.path}/mywebapp/src/main/webapp/WEB-INF/" includes="**/*"/>
<lib dir="${dist.path}/" includes="*.jar"/>
<classes dir="${source.path}/mywebapp/src/main/resources/" includes="**/*"/>
<fileset dir="${source.path}/mywebapp/src/main/webapp/">
<include name="**/*.jsp"/>
</fileset>
<fileset dir="${source.path}/mywebapp/src/main/webapp/">
<include name="main/**/*"/>
</fileset>
</war>
</target>
<target name="compileear" description="Compile Ear file">
<ear destfile="${source.path}/myear/src/main/application/WebApp.ear" appxml="${svn.working.project.path}application.xml">
<metainf dir="${source.path}/mywebapp/src/main/webapp/META-INF"/>
<fileset dir="${dist.path}/" includes="*.war"/>
</ear>
</target>
THanks @!
I have the problem solved. This is due to the missing source properties in javac ant task. As mention in the ANT documentation for source properties:
It is recommended to specify the java version that going to be used for the compilation. Below is the sample usage on the source properties:
THanks @!