Hit AppDeploymentException when deploy on WebSpher

2019-08-03 04:24发布

I made the war file through eclipse IDE, and when deploy it to WebSphere 6.1, I hit the following error:

The EAR file could be corrupt and/or incomplete. Make sure that the application is at a compatible Java 2 Platform, Enterprise Edition (J2EE) Level for WebSphere Application Server. AppDeploymentException: [null] java.lang.ClassCastException: org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl incompatible with org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile

I had been searching around so far couldn't fine a workable solution? Any clue would be much appreciated.

2条回答
孤傲高冷的网名
2楼-- · 2019-08-03 04:43

I saw a very similar error deploying to WebSphere 6.1. In my case the problem was that I created the EAR file manually and I had the content of the EAR in a sub-folder by mistake. Unzip your EAR and check that all config files are at the right level, ie. ./META-INF/application.xml

查看更多
【Aperson】
3楼-- · 2019-08-03 04:54

In WebSphere 6.1, it doesn't support xml schema version 2.5, it only up until 2.4. And take note that the jdk is version 1.5 from IBM version, not SUN. Below is the correct declaration in the web.xml.

<web-app id="WebApp_ID" version="2.4"  xmlns="http://java.sun.com/xml/ns/j2ee"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
查看更多
登录 后发表回答