由于处理其结构时出现故障,无法在 WildFly 8 上部署耳朵 [英] Cannot deploy ear on WildFly 8 due to failures when processing its structure

查看:18
本文介绍了由于处理其结构时出现故障,无法在 WildFly 8 上部署耳朵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Wildfly 上尝试部署当前适用于 Glassfish 4 的 EAR 时遇到以下错误:

I'm having the following error on Wildfly when trying to deploy an EAR that currently works on Glassfish 4:

09:04:08,976 ERROR [org.jboss.as.controller.management-operation] 
(DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment")
 failed - address: ([]) - failure description: {"JBAS014671: Failed services" => 
{"jboss.deployment.unit."planoa.ear".STRUCTURE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit."planoa.ear".STRUCTURE: JBAS018733: Failed to process phase
STRUCTURE of deployment "planoa.ear"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011037: Unable to process modules in application.xml for EAR 
["/home/psoto/Programs/wildfly-8.1.0.Final/standalone/deployments/planoa.ear"],
module file planoa-update-ejb.jar not found"}}

09:04:09,071 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565:
Replaced deployment "planoa.ear" with deployment "planoa.ear"
09:04:09,072 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) 
JBAS014774: Service status report
JBAS014777:   Services which failed to start:
service jboss.deployment.unit."planoa.ear".STRUCTURE:
org.jboss.msc.service.StartException in service 
jboss.deployment.unit."planoa.ear".STRUCTURE: JBAS018733: Failed to process phase 
STRUCTURE of deployment "planoa.ear" 
service jboss.deployment.unit."planoa.ear".STRUCTURE

这是我的application.xml的内容(用maven ear插件生成):

This is the content of my application.xml (generated with maven ear plugin):

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
  <display-name>planoa-ear</display-name>
  <module>
    <ejb>planoa-update-ejb.jar</ejb>
  </module>
  <module>
    <ejb>planoa-core-ejb.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>planoa-web.war</web-uri>
      <context-root>/</context-root>
    </web>
  </module>
  <library-directory>lib</library-directory>
</application>

这是jar -tf myearfile.ear 的输出:

This is the output of jar -tf myearfile.ear:

META-INF/
META-INF/MANIFEST.MF
lib/
lib/planoa-messages.jar/
lib/planoa-messages.jar/META-INF/
lib/planoa-messages.jar/META-INF/maven/
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/
lib/planoa-pu.jar/
lib/planoa-pu.jar/com/
lib/planoa-pu.jar/com/gi/
lib/planoa-pu.jar/com/gi/planoa/
lib/planoa-pu.jar/com/gi/planoa/pu/
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/
lib/planoa-pu.jar/META-INF/
lib/planoa-pu.jar/META-INF/maven/
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/
lib/planoa-log.jar/
lib/planoa-log.jar/META-INF/
lib/planoa-log.jar/META-INF/maven/
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/
planoa-web.war
META-INF/application.xml
META-INF/jboss-app.xml
META-INF/glassfish-application.xml
META-INF/jboss-deployment-structure.xml
planoa-core-ejb.jar
planoa-update-ejb.jar
lib/commons-codec-1.5.jar
lib/gson-2.2.4.jar
lib/gi-commons-ejb-jee7-3.0.37.jar
lib/gi-commons-logback-3.0.37.jar
lib/gi-commons-jsf2-3.0.37.jar
lib/poi-3.10-FINAL.jar
lib/planoa-core-service.jar
lib/commons-lang3-3.1.jar
lib/gi-commons-utils-3.0.37.jar
lib/gi-commons-jaxws-3.0.37.jar
lib/planoa-messages.jar/WebMessageResources.properties
lib/planoa-messages.jar/META-INF/MANIFEST.MF
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/pom.properties
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/pom.xml
lib/planoa-messages.jar/ValidationMessages.properties
lib/providers-io-geonames-1.0.03-20141008.234431-86.jar
lib/joda-time-2.4.jar
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/PlanoASqlSessionLog.class
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/PlanoASqlSessionCustomizer.class
lib/planoa-pu.jar/META-INF/MANIFEST.MF
lib/planoa-pu.jar/META-INF/persistence.xml
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/pom.properties
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/pom.xml
lib/slf4j-api-1.7.7.jar
lib/logback-core-1.1.2.jar
lib/commons-logging-1.1.3.jar
lib/primefaces-5.0.6.jar
lib/planoa-log.jar/logback_desarrollo.xml
lib/planoa-log.jar/META-INF/MANIFEST.MF
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/pom.properties
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/pom.xml
lib/planoa-log.jar/logback.xml
lib/gi-commons-beanvalidation-3.0.37.jar
lib/commons-lang-2.6.jar
lib/gi-commons-validation-3.0.37.jar
lib/logback-classic-1.1.2.jar
lib/planoa-core-model.jar
lib/primefaces-extensions-2.1.0.jar
META-INF/maven/
META-INF/maven/com.gi.planoa/
META-INF/maven/com.gi.planoa/planoa-ear/
META-INF/maven/com.gi.planoa/planoa-ear/pom.xml
META-INF/maven/com.gi.planoa/planoa-ear/pom.properties

错误表明未找到 planoa-update-ejb.jar,但正如您所见,它在耳朵内.

The error says that planoa-update-ejb.jar was not found, but as you can see, its inside the ear.

此外,如果我选择生成的耳朵,并通过网络界面部署它,它可以完美地工作.所以我认为这是 netbeans wildfly 插件的问题.

推荐答案

经过数小时的搜索,我想我找到了问题所在.重要的是要了解 Netbeans 的 EE 7 插件似乎将 EAR 和 WAR 部署为分解工件(这使得开发速度更快).包装好的 EAR 可以工作而爆炸的耳朵不起作用的原因实际上正是它告诉您的(它找不到模块).

After hours of searching I think I found what the issue is. Its important to understand that the EE 7 plugins for Netbeans seem to deploy the EARs and WARs as exploded artifacts (This makes development fast). The reason why the packaged EAR will work and the exploded ear doesn't is in fact exactly what its telling you (it cannot find the module(s)).

您必须查看应用服务器的部署目录.

You have to look your application server's deployment directory.

注意:在你打包的 EAR 上运行 jar -tf 会给你误导性的信息,因为这不是使用 IDE 部署时部署的内容

NOTE: running jar -tf on you packaged EAR will give you misleading information, because that's NOT what's deployed when using an IDE to deploy

此问题的根本原因在于您构建项目的方式.我知道在 Maven 中,我们中的一些人喜欢通过执行以下操作来消除版本信息:

The root cause of this issue is in the way you build your project. I know in Maven some of us like the do away with version information by doing something like this:

<build>
   <!-- This is replicated to your packing mechanisms (May cause problems in Exploded deployments) -->
   <finalName>${project.artifactId}</finalName>
</build>

这篇关于由于处理其结构时出现故障,无法在 WildFly 8 上部署耳朵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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