这是我耳朵的结构:
ear
---META_INF
------MANIFEST.MF
------application.xml
------jboss-app.xml
------jboss-deployment-structure.xml
---lib
---restful.war
---service.jar
这是application.xml的内容:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" version="7">
<application-name>bolan</application-name>
<display-name>oa-demo-client</display-name>
<module>
<ejb>service.jar</ejb>
</module>
<module>
<web>
<web-uri>restful.war</web-uri>
<context-root>/oa-restful</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</application>
在这link,我找到了一个可能的答案。但没有解决方案。谁能告诉我一个解决方案。我真的要远离ejb jar上的版本和战争。
这是使用maven成功部署的日志:
11:26:19,856 INFO [org.jboss.as.server] (management-handler-thread - 1) JBAS018562: Redeployed "oa-ear-0.0.1.ear"
11:26:19,856 INFO [org.jboss.as.server] (management-handler-thread - 1) JBAS018565: Replaced deployment "oa-ear-0.0.1.ear" with deployment "oa-ear-0.0.1.ear"
11:26:19,865 INFO [org.jboss.as.repository] (management-handler-thread - 1) JBAS014901: Content removed from location D:\cxj\jboss\wildfly-8.2.0.Final\standalone\data\content\dd\0ad01607fd011a7e925324c419fea6bca98d23\content
使用netbean:
进行调试时,是部署失败的日志11:27:43,499 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found oa-ear-0.0.1.ear in deployment directory. To trigger deployment create a file called oa-ear-0.0.1.ear.dodeploy
11:27:43,517 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017535: Unregistered web context: /oa-restful
11:27:43,613 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 72) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'oa-ear-0.0.1.ear#oa-demo'
11:27:43,616 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016009: Stopping weld service for deployment oa-ear-0.0.1.ear
11:27:43,627 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 72) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'oa-ear-0.0.1.ear#oa-demo'
11:27:43,633 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015974: Stopped subdeployment (runtime-name: service.jar) in 122ms
11:27:43,654 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015974: Stopped subdeployment (runtime-name: restful.war) in 143ms
11:27:43,753 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment oa-ear-0.0.1.ear (runtime-name: oa-ear-0.0.1.ear) in 242ms
11:27:43,754 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "oa-ear-0.0.1.ear" (runtime-name: "oa-ear-0.0.1.ear")
11:27:44,034 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC000001: Failed to start service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "oa-ear-0.0.1.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011037: Unable to process modules in application.xml for EAR ["/D:/cxj/jboss/wildfly-8.2.0.Final/standalone/deployments/oa-ear-0.0.1.ear"], module file service.jar not found
at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:187)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
11:27:44,037 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.\"oa-ear-0.0.1.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"oa-ear-0.0.1.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"oa-ear-0.0.1.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011037: Unable to process modules in application.xml for EAR [\"/D:/cxj/jboss/wildfly-8.2.0.Final/standalone/deployments/oa-ear-0.0.1.ear\"], module file service.jar not found"}}
11:27:44,591 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "oa-ear-0.0.1.ear" with deployment "oa-ear-0.0.1.ear"
11:27:44,592 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "oa-ear-0.0.1.ear"
11:27:44,606 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 1) JBAS014901: Content removed from location D:\cxj\jboss\wildfly-8.2.0.Final\standalone\data\content\f7\a17c1733955fded66d13801fe2c2ce1be4d836\content
11:27:54,668 INFO [org.jboss.as.server.deployment] (MSC service thread 1-15) JBAS015877: Stopped deployment oa-ear-0.0.1.ear (runtime-name: oa-ear-0.0.1.ear) in 2ms
11:27:54,669 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "oa-ear-0.0.1.ear" (runtime-name: "oa-ear-0.0.1.ear")
11:27:54,861 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "oa-ear-0.0.1.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011037: Unable to process modules in application.xml for EAR ["/D:/cxj/jboss/wildfly-8.2.0.Final/standalone/deployments/oa-ear-0.0.1.ear"], module file service.jar not found
at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:187)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
11:27:54,862 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.\"oa-ear-0.0.1.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"oa-ear-0.0.1.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"oa-ear-0.0.1.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011037: Unable to process modules in application.xml for EAR [\"/D:/cxj/jboss/wildfly-8.2.0.Final/standalone/deployments/oa-ear-0.0.1.ear\"], module file service.jar not found"}}
11:27:54,990 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "oa-ear-0.0.1.ear" with deployment "oa-ear-0.0.1.ear"
11:27:54,990 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "oa-ear-0.0.1.ear"
service jboss.deployment.unit."oa-ear-0.0.1.ear".STRUCTURE