Websphere deploy war package fail: JVM compatible issue

    Problem:

    com.ibm.websphere.management.application.client.AppDeploymentException: 
    [Root exception is org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: WEB-INF/classes/com/webspheretools/logview/DisplayRawServlet.class] 

    Solution:

    ANT was copying two versions of each class files .ie one for the webcontent folder (fileset directive) in ANT and another command (classes directive) was also copying the classes to the destination WAR build folder. When the WAR as packaged and deployed as an EAR, Websphere was very unhappy as there were two classes for each artifact, hence the above error.


    <war   destfile= "${dest.dir}/${package.file}"   webxml= "${temp.dir}/WebContent/WEB-INF/web.xml"   update= "true" >

    <classes dir="${temp.dir}/WebContent/WEB-INF/classes" />
    <fileset   dir= "${temp.dir}/WebContent" >
    <exclude   name= "WEB-INF/web.xml"   />
    </fileset>

    </war>


    Should have been

    <war   destfile= "${dest.dir}/${package.file}"   webxml= "${temp.dir}/WebContent/WEB-INF/web.xml"   update= "true" >

    <fileset   dir= "${temp.dir}/WebContent" >
    <exclude   name= "WEB-INF/web.xml"   />
    </fileset>

    </war>

你可能感兴趣的:(Websphere deploy war package fail: JVM compatible issue)