Hibernate Error Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger
The following exception is being thrown due to missing of the library jboss-logging-3.1.0.GA.jar.
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:176)
at com.hibernate.utils.HibernateUtil.getSessionFactory(HibernateUtil.java:15)
at com.hibernate.application.RunApplication.main(RunApplication.java:16)
Caused by: java.lang.ClassNotFoundException: org.jboss.logging.BasicLogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 15 more
Solution:
Or
Add the dependency in Maven’s pom.xml
<dependency>
<groupId>jboss-logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.0</version>
</dependency>
You may also like to read the below posts:
No comments:
Post a Comment