I found settings :
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') ?
Emil Posmyk wrote:
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:
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-184.108.40.206.jar:main"
You should able to get this working from the jboss-deployment-structure.xml by adding that dependency to the (commons-security-util-220.127.116.11.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-18.104.22.168.jar"> <dependencies> <module name="org.apache.commons.configuration"/> </dependencies> </sub-deployment> <jboss-deployment-structure>
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.