0 Replies Latest reply on Jun 20, 2018 2:56 PM by mevans7

    WildFly 13 jboss-deployment-structure.xml strange behavior

    mevans7

      I've deployed my application that works OK in WildFly 12, into a WildFly 13 installation.  In WF13, I have 3 WAR files whose deployment fails because of a missing EJB (deployed in an EAR file).  This looks like a deployment order problem.  In both deployments I have a jboss-deployment-structure.xml file that calls out the EAR file.

       

      <?xml version="1.0"?>

      <jboss-deployment-structure>

        <deployment>

          <dependencies>

            <module name="deployment.MYEARAPP" />

          </dependencies>

        </deployment>

      </jboss-deployment-structure>

       

      Where MYEARAPP is the <application-name> from my application.xml file.  JBoss seems to see this but does not seem to respect it.  From log files, it looks like JBoss processes my WAR files in the middle of processing my EAR file.

       

      I changed the WAR jboss-deployment-structure.xml files in my 3 WARS by adding annotations="true" as follows:

       

            <module name="deployment.MYEARAPP" annotations="true" />

       

      Now the WAR files do not complain about the missing EJB from MYEARAPP but rather complain about:

       

      • ClassNotFoundException: com.mycompany.MyBean (in 2 war files)
      • A component named 'MyCopmonent' is already defined in this module (in 1 war file)

       

      Why did my files work in WildFly 12 (or was I lucky in deployment timing)?

      Why does this look different in WildFly 13?

      What are the secrets to EAR/WAR deployment ordering?  (I've spent a lot of time looking at docs on jboss-deployment-structure.xml online -- I don't understand "export", don't know why "optional" would be a good idea, and just started testing with "annotations = true".)