Hibernate Dependency Library Exception (Commons Annotations) : org/hibernate/annotations/common/reflection/MetadataProvider

SHARE & COMMENT :

If you miss the Hibernate commons annotations library hibernate-commons-annotations-4.0.4.Final.jar, then you would get java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProvider exception.

<dependency>
	<groupId>hibernate-commons-annotations</groupId>
	<artifactId>hibernate-commons-annotations</artifactId>
	<version>4.0.4.GA</version>
</dependency>

<repositories>
    <repository>
      <id>JBoss repository</id>
      <url>http://repository.jboss.com/maven2/</url>
    </repository>
</repositories>

Exception Trace

Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/annotations/common/reflection/MetadataProvider
	at javabeat.net.hibernate.HibernateUtil.main(HibernateUtil.java:12)
Caused by: java.lang.ClassNotFoundException: org.hibernate.annotations.common.reflection.MetadataProvider
	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)

Comments

comments

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Speak Your Mind

*

Close
Please support the site
By clicking any of these buttons you help our site to get better