3 Replies Latest reply on Mar 30, 2015 5:57 AM by franco80

    Wildfly jboss-deployment-structure.xml - commons-configuration

    franco80 Novice

      Hi all

       

      I'm trying to use the module commons-configuration.jar located in Wildfly (not from my ear/lib folder). I added to jboss.deployment-structure.xml that dependency:

      <jboss-deployment-structure>

          <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

          <deployment>

              <dependencies>

       

                  <module name="org.apache.commons.configuration"/>

      but the application continues to show me the error:

       

      java.lang.ClassNotFoundException: org.apache.commons.configuration.ConfigurationException from [Module "deployment.app-ear.ear.commons-security-util-1.0.4.2.jar:main"

       

      Structure of my project is:

      | ear

      | ____ | lib

      |         | ____ some.jar

      |         | ____ ...

      |

      | ____ | commons-security-util-1.0.4.2.jar (EJB)

      | ____ | app.war

      |

      ...

      I don't want have commons-configuration.jar in ear, I want only use commons jars from folder modules from wildfly 8.2.

       

      How can I to solve it ?

       

      thanks

      --

      F.

        • 1. Re: Wildfly jboss-deployment-structure.xml - commons-configuration
          franco80 Novice

          I found settings :

           

          <subsystem xmlns="urn:jboss:domain:ee:1.0" >           

           

            <global-modules>

              <module name="org.javassist" slot="main" />           

            </global-modules>

          </subsystem>

           

          it's working but it is possible to use settings only from jboss-deployment-structure.xml only (without using settings 'global-modules in standalone.xml') ?

          • 2. Re: Wildfly jboss-deployment-structure.xml - commons-configuration
            jaikiran pai Master

            Emil Posmyk wrote:

             

            Hi all

             

            I'm trying to use the module commons-configuration.jar located in Wildfly (not from my ear/lib folder). I added to jboss.deployment-structure.xml that dependency:

            <jboss-deployment-structure>

                <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

                <deployment>

                    <dependencies>

             

                        <module name="org.apache.commons.configuration"/>

            but the application continues to show me the error:

             

            java.lang.ClassNotFoundException: org.apache.commons.configuration.ConfigurationException from [Module "deployment.app-ear.ear.commons-security-util-1.0.4.2.jar:main"

             

            You should able to get this working from the jboss-deployment-structure.xml by adding that dependency to the (commons-security-util-1.0.4.2.jar) *sub-deployment* section. Take a look at the documentation here and see the example for jboss-deployment-structure.xml which shows how to add a dependency for a sub-deployment Class Loading in WildFly - WildFly 8 - Project Documentation Editor. Something like this:

             

            <jboss-deployment-structure>
                    <sub-deployment name="commons-security-util-1.0.4.2.jar">
                        <dependencies>
                            <module name="org.apache.commons.configuration"/>
                        </dependencies>
                    </sub-deployment>                   
            <jboss-deployment-structure>
            
            • 3. Re: Wildfly jboss-deployment-structure.xml - commons-configuration
              franco80 Novice

              Hi jaikiran


              Thanks for the answear.


              I have tried in this way but it doesn't work for me (same error message). For now I'll leave with global-modules.