The question is for the webapp WAR with Spring+Hibernate deployed to WF8.
After webapp upgrade from Hibernate-3.x to 4.x the Hibernate logging stopped working.
The Hibernate-3.x was using
Slf4j. The Hibernate logging was configured in the webapp with declaration in
jboss-deployment-structure.xml:
<exclusions>
<module name="org.apache.log4j"/>
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
</exclusions>This declaration makes all logging classes to be loaded from WAR, not WF8.
The Hibernate-4.x is using
jboss-logging. The additional exclusion
<exclusions>
<module name="org.jboss.logging"/>
. . .
</exclusions>initializes the webapp logger correctly but also breaks WF8 with Log4j error:
log4j:WARN No appenders could be found for logger (org.jboss.logging).How to enforce loading classes from
jboss-logging-3.x.Final.jar in the webapp and ignore classes loaded from this jar in WF8?
How to initialize
jboss-logging in the webapp and not to break the WF8?
See also
https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly