I'm getting a LogConfigurationException
when trying to load the configuration of my application. It's an EAR Java application, deployed in a Wildfly 17 application server locally.
I'm using commons-configuration
, so I've deployed it as a dependency in my jboss-deployment-structure.xml
file:
<dependencies>
...
<module name="org.apache.commons.commons-configuration2" slot="2.5" export="true" />
The module.xml
file for commons-configurations2
is as follows:
<module xmlns="urn:jboss:module:1.1" name="org.apache.commons.commons-configuration2" slot="2.5">
<resources>
<resource-root path="commons-configuration2-2.5.jar"/>
</resources>
<dependencies>
<module name="org.apache.commons.commons-lang3" slot="3.9" />
<module name="org.apache.commons.commons-text" slot="1.6" />
<module name="commons-logging.commons-logging" slot="1.2" />
<module name="javax.servlet.servlet-api" slot="2.4" />
</dependencies>
</module>
Each of those dependencies have their own modules, with the same dependencies as their pom file.
Server starts without errors, but when I try to read my configuration file, I get this error:
Caused by: org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:804)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
at org.apache.commons.beanutils.PropertyUtilsBean.<init>(PropertyUtilsBean.java:123)
at org.apache.commons.configuration2.beanutils.BeanHelper.initBeanUtilsBean(BeanHelper.java:625)
at org.apache.commons.configuration2.beanutils.BeanHelper.<clinit>(BeanHelper.java:88)
commons-configuration2
's module has a dependence with commons-logging
version 1.2, which contains the Log4JLogger
class that seems to be missing.
I believe there is some kind of collision between this module and Wildfly's own logging configuration. However, I've tried adding/removing any commons-logging
dependency in both my jboss-deployment-structure.xml
and in commons-configuration2
module, but I always get the same error.
Any clue on the problem, or anything I could try to get some more information?
Thanks and best regards.