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

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

问题描述

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

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天全站免登陆