【发布时间】:2021-10-30 20:03:15
【问题描述】:
我有一个包含以下模块的应用程序 ct-ejb (ejb) ct-休息(战争) ct-web(战争) ct-ear(耳)
我正在尝试构建一个 EAR 文件并将其部署到 intellij 中的 JBOSS 应用程序服务器。我的 application.xml 如下所示。我从 ct.ear 模块 -> 目标文件夹中得到它。
<?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>ct-ear</display-name>
<module>
<web>
<web-uri>ct-web.war</web-uri>
<context-root>caretrack</context-root>
</web>
</module>
<module>
<web>
<web-uri>ct-rest.war</web-uri>
<context-root>ctrest</context-root>
</web>
</module>
<module>
<ejb>ct-ejb.jar</ejb>
</module>
<library-directory>lib</library-directory>
</application>
问题是我在将 ear 部署到服务器时遇到异常。 它清楚地说“找不到模块文件 ct-web.war ..”但是 ct-web.war 存在于目标文件夹中。 有人可以帮我解决这个问题吗?
11:52:49,468 INFO [org.jboss.as.server.deployment] [] [] JBAS015876: Starting deployment of "ct.ear" (runtime-name: "ct.ear")
11:52:49,485 ERROR [org.jboss.msc.service.fail] [] [] MSC000001: Failed to start service jboss.deployment.unit."ct.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ct.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "ct.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:184) [jboss-as-server-7.5.19.Final-redhat-2.jar:7.5.19.Final-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_201]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_201]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011037: Unable to process modules in application.xml for EAR ["/C:/jboss-eap-6.4/bin/content/ct.ear"], module file ct-web.war not found
at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:187)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.19.Final-redhat-2.jar:7.5.19.Final-redhat-2]
【问题讨论】:
标签: java jakarta-ee deployment ear jboss6.x