Posts Tagged ‘hibernate-problems’

Hibernate 3: org.slf4j.impl.StaticLoggerBinder

December 2, 2008

I have recently downloaded the latest Hibernate 3 binary: [version 3.3.1].

I was writing up a test to verify my DAO + hibernate mapping against an in-memory HSQLDB.

I added the hibernate3.jar and all its dependencies to my classpath yet when i executed the test i got the ClassDefNotFound exception for org.slf4j.impl.StaticLoggerBinder.

Looking into the slf4j-api-1.5.2.jar, I could see that there was no impl package! I decided to download the 1.5.2 version of slf4j myself from http://www.slf4j.org/download.html. I unzipped the distribution and when looking in at the source package of slf4j-api saw that the impl package existed but did not exist in the slf4j-api-1.5.2.jar that is part of the distribution.

So looking inside the slf4j-simple-1.5.2.jar that is also part of slf4j-1.5.2 download, I could see that it had a impl package, so I added this to my classpath along with slf4j-api-1.5.2.jar and that stopped the ClassDefNotFound problem.

Not sure that this is correct thing to do but couldn’t find anything better in my quick qoogle searches.

Advertisements