Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: No logging from Hibernate-4.x on WildFly-8
PostPosted: Fri Dec 16, 2016 4:44 pm 
Newbie

Joined: Fri Dec 16, 2016 4:16 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.