Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Problem 2:

 

Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:196)

at com.saravanan.hibernate.test.HibernateBasicTestCase.main(HibernateBasicTestCase.java:26)

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

 

 

Solution:

 

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

Advertisements

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: