-->
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: Basic Hibernate question
PostPosted: Tue Jul 14, 2009 7:33 pm 
Newbie

Joined: Sat Jan 24, 2009 1:32 pm
Posts: 9
Hello, it's been some time since I dabbled in hibernate. I wanted to create a basic hello world hibernate app and took all of the jars from hibernate core 3.3.2.GA and put them in my lib folder. My classpath correctly points to the jars. I have created a very simple MySQL db with one table with one int column (id, primary key) and one varchar(45) column (data). I have created a corresponding entity class with it's hbm.xml file in the same directory and a proper hibernate.cfg.xml.

Everything compiles, but when running I get the following exception:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

I have noted that in the hibernate-distribution 3.3.2 GA there is a jar file named slf4j-api-1.5.8.jar which was copied over into my lib dir along with all of the other jars. So I am puzzled as to why I am missing a jar. Do I need one of the other hibernate downloads besides the core?

Regards,

Tim


Top
 Profile  
 
 Post subject: Re: Basic Hibernate question
PostPosted: Wed Jul 15, 2009 9:20 am 
Senior
Senior

Joined: Tue Aug 01, 2006 9:24 pm
Posts: 120
You need the SLF4J library. This get's me all the time too. You might also have versioning conflicts make sure that you have the correct version that hibernate needs. I don't know off the top of my head but if you post the versions you are using someone might be able to help you out.

SLF4J libraries can be found here if you can't find them in your hib dist folder anywhere
http://www.slf4j.org/

_________________
Please rate my replies as I need points for all of my questions also.


Top
 Profile  
 
 Post subject: Re: Basic Hibernate question
PostPosted: Wed Jul 15, 2009 12:56 pm 
Newbie

Joined: Sat Jan 24, 2009 1:32 pm
Posts: 9
Ya, that was it. I needed the jar for slf4j. I was surprised that it wasn't included in the hibernate core distribution or that they at least failed to mention it was necessary to get.

Regards,

Tim


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.