SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.

Problem 1:

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
Initial SessionFactory creation failed.
java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
Exception in thread “main” java.lang.ExceptionInInitializerError
at util.HibernateUtil.<clinit>(HibernateUtil.java:18)
at annuaire.test.TestHibernate.main(TestHibernate.java:14)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/
StaticLoggerBinder
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
at util.HibernateUtil.<clinit>(HibernateUtil.java:13)
… 1 more

Solution:

download an older version of slf4j.

I downloaded the same version of slf4j from here: http://www.slf4j.org/dist/ and the problem is gone.

Place the slf4j-api-1.5.2-sources.jar in classpath.

Or place slf4j-log4j12-1.5.2.jar file in the classpath.

Advertisements

One Trackback

  1. […] SLF4J: Failed to load class “org.slf4j.impl … – Or place slf4j-log4j12-1.5.2.jar file in the classpath. Share this: Facebook; Like this: Like Loading… Related. This entry was written by SARAVANAN SIVAJI, posted on November 29, 2010 at 7:13 pm, filed under Hibernate. Bookmark the permalink. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: