简体   繁体   中英

Fail to deploy ear file to jboss from intellij ultimate

I have an application which have following modules ct-ejb (ejb) ct-rest (war) ct-web (war) ct-ear (ear)

I am trying to build an EAR file and deploy it to JBOSS application server in intellij. My application.xml looks like below. I got it from ct.ear module -> target folder.

<?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>

The issue is that i am getting exception while deploying ear to the server. It clearly says "module file ct-web.war not found .." BUT ct-web.war exists in target folder. Can someone help me with this?

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]

I figured it out myself. Maybe it would help someone in the future. I deleted contents from tmp folder and it simply worked. Sometimes deleting content from tmp folder does the magic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM