*
The moose likes Other Open Source Projects and the fly likes Can I run hibernate annotations 3 without sl4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Can I run hibernate annotations 3 without sl4j" Watch "Can I run hibernate annotations 3 without sl4j" New topic
Author

Can I run hibernate annotations 3 without sl4j

Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

Hi

I am using hibernate annotations v 3.4 and I run atest on below code-



The exception Iget is -


I understand AnnotationsConfiguration usses sl4j for logging -



Can i configure it to use log4j ?
Is it mandatory to add sl4j ?

Anrd
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

I am moving this topic to our Other Open Source Projects forum as this question relates to logging frameworks more than ORM.


[How To Ask Questions][Read before you PM me]
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

sl4j is a logging abstraction it is not a logging framework. You can use whatever logging framework you would like but you must have sl4j on the classpath. If this is a new project I would recommend using Logback over log4j but either work with sl4j.

Here is a post where a portion discusses configuring sl4j and logback.

http://gordondickens.com/wordpress/2012/07/03/enterprise-spring-best-practices-part-1-project-config/#logging


here is a post describing lo4j with sl4j
http://www.mkyong.com/hibernate/how-to-configure-log4j-in-hibernate-project/


Conflicting versions of sl4j on the classpath will cause issues as well. The first link I posted shows how you can use the maven enforcer plugin to help with this.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can I run hibernate annotations 3 without sl4j
 
Similar Threads
Error creating connetion from JNDI data sources
RMI and Ubuntu (Linux) Problem!
Erro while commit transaction
rampart security issue
OpenEJB and Derby