【发布时间】:2014-08-29 17:04:41
【问题描述】:
我正在尝试编译 EAR 文件并将其部署到 WebSphere 6.1 应用服务器 (WAS) -- 没有 Rational Application Developer (RAD) 或 Liberty。我正处于尝试将编译和部署移动到构建服务器的初始阶段。我对编译没有任何问题。但是,当我尝试部署 EAR 时,我得到一个 AppDeploymentException:
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.
我在某处读到(现在找不到链接)必须使用 IBM JDK 编译 WAS 文件。所以我installed that 并用它重新编译但遇到了同样的问题。
类文件的主要版本(来自 javap)是正确的,但我仍然对这个错误感到困惑,因为“工作”和“不”之间的唯一区别似乎是字节码本身。是否还有其他一些内在的魔力需要 RAD 构建这些文件?
This question 建议对于 WebSphere 6.1,web.xml 模式必须是 2.4,但这对我没有影响。事实上,如果我使用一个可以工作的 EAR(通过 RAD 创建),然后只将类文件复制到由原始 JDK/gradle 进程创建的 EAR 中,它就会工作。
抱歉,我对 WebSphere 不太熟悉,无法包含有关该错误的更多信息。我检查了该配置文件的 activity.log 文件,甚至找不到控制台输出中报告的错误。 dmgr 日志只说:
[7/8/14 12:46:56:886 PDT] 0000073b ApplicationDe I ApplicationDeploymentController perform ApplicationDeploymentControll
er: performing appcontexts refresh
[7/8/14 12:47:00:416 PDT] 0000073b WebApp A SRVE0180I: [isclite#isclite.war] [/ibm/console] [Servlet.LOG]: action: ApplicationDeploymentDetailForm was null.Creating new form bean and storing in session
[7/8/14 12:48:25:273 PDT] 0000062d wtp W org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ModuleRefImpl in
itModuleFileFromEAR Ignoring FileNotFoundException [ mbepepWeb.war ]
[7/8/14 12:48:25:279 PDT] 0000062d wtp E org.eclipse.jst.j2ee.application.internal.impl.WebModuleImpl incomp
atible with org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile
我不确定这有多相关。提到的war文件位于EAR文件的根目录。
希望有人有建议!
【问题讨论】:
标签: java deployment gradle websphere websphere-6.1