4 Replies Latest reply on Feb 1, 2019 3:31 AM by tisaksen

    module reference in jboss-deployment-structure.xml not working

    tisaksen

      I have  jboss-deployment-structure.xml placed in WEB-INF of my .war file deployed on WildFly 15:

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
        <deployment>
        <dependencies>
        <module name="org.javassist" />
        </dependencies>
        </deployment>
      </jboss-deployment-structure>

       

      Why isn't this working?

       

      When I add the dependency to MANIFEST.MF of the war file it is working fine:

       

      Dependencies: org.javassist import

        • 1. Re: module reference in jboss-deployment-structure.xml not working
          simkam

          Hi,

           

          your j-d-s.xml looks correct, you can try to recent schema version 1.3.

           

          I'm confused from

          """

          Dependencies: org.javassist import

          """

          import isn't valid parameter, valid parameters are export, optional, services, annotations, meta-inf. Check Developer Guide. If you try to import services, you should use <module name="org.javassist" services="import"/> in j-d-s.xml

          • 2. Re: module reference in jboss-deployment-structure.xml not working
            tisaksen

            Hi Martin,

             

            I don't really know where I got the "import" part from in the Manifest but I removed it and it's working fine. However, when I remove the Dependencies listing in the manifest and put the updated j-d-s.xml in either one of WEB-INF in the WAR file or META-INF of the EAR file, it does not work and I get a ClassNotFoundException

             

             

            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
              <deployment>
              <dependencies>
              <module name="org.javassist" services="import"/>
              </dependencies>
              </deployment>
            </jboss-deployment-structure>

             

            • 3. Re: module reference in jboss-deployment-structure.xml not working
              simkam

              So is it WAR inside EAR? If that is the case I think you need to put j-d-s.xml to META-INF of EAR and specify dependencies for subdeployments.

               

              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">

                <sub-deployment name="name.war">

                  <dependencies>

                    <module name="org.javassist" />

                  </dependencies>

                </sub-deployment>

              </jboss-deployment-structure>

              1 of 1 people found this helpful
              • 4. Re: module reference in jboss-deployment-structure.xml not working
                tisaksen

                That was it. Thank you so much!