在WebSphere上部署时,点击AppDeploymentException [英] Hit AppDeploymentException when deploy on WebSphere

查看:386
本文介绍了在WebSphere上部署时,点击AppDeploymentException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过eclipse IDE制作了war文件,当将其部署到WebSphere 6.1时,我遇到以下错误:


EAR文件可能已损坏和/或不完整。确保
应用程序位于适用于WebSphere Application Server的兼容Java 2平台企业版
(J2EE)级别。 AppDeploymentException:
[null] java.lang.ClassCastException:
org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ArchiveImpl

org.eclipse.jst不兼容。 j2ee.commonarchivecore.internal.ModuleFile


到目前为止,我一直在搜索不了一个可行的解决方案?任何线索都将不胜感激。

解决方案

在WebSphere 6.1中,它不支持xml模式版本2.5, 2.4。并注意,jdk是IBM版本的1.5版本,而不是SUN。以下是web.xml中的正确声明。

 < web-app id =WebApp_IDversion =2.4 xmlns =http://java.sun.com/xml/ns/j2eexmlns:xsi =http://www.w3.org/2001/XMLSchema-instancexsi:schemaLocation =http:// java .sun.com / xml / ns / j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\"> 


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.

解决方案

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">

这篇关于在WebSphere上部署时,点击AppDeploymentException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆