-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How to Use SLF4J Instead of JBoss Logging?
PostPosted: Mon Feb 20, 2012 12:44 pm 
Newbie

Joined: Mon Feb 20, 2012 12:38 pm
Posts: 1
Does anyone know how to use SLF4J instead of JBoss logging? My application uses Hibernate 4.0.0.Final which dependends on JBoss Logging; and whenever I run my application JBoss is selected as the logging mechanism even though SLF4J is in the classpath --
Quote:
org.jboss.logging [DEBUG] Logging Provider: org.jboss.logging.Log4jLoggerProvider


I've tried excluding JBoss logging, but then my application does NOT compile.


Top
 Profile  
 
 Post subject: Re: How to Use SLF4J Instead of JBoss Logging?
PostPosted: Tue Feb 21, 2012 3:06 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
With major version 4 Hibernate has decided to move to jboss logging and get rid of SLF4J ,
see https://hibernate.onjira.com/browse/HHH-5615
You are forced to use JBoss Logging with Hibernate4, SLF4J is not used anymore within Hibernate4


Top
 Profile  
 
 Post subject: Re: How to Use SLF4J Instead of JBoss Logging?
PostPosted: Wed Nov 07, 2012 3:36 pm 
Beginner
Beginner

Joined: Tue Mar 17, 2009 12:19 pm
Posts: 22
So can Hibernate 4 be used with JBoss AS 5?

I've added jboss-logging-3.1.2.GA.jar to my classpath but then I get

Code:
java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;


because JBoss 5 has jboss-common.jar which has an older implementation of the Logger class which I assume is getting loaded before jboss-logging. And I can't remove jboss-common without breaking JBoss of course.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.