NoClassDefFoundError: javax/persistence/ManyToOne

Asked on May 28, 2013
Hellow friends,
I am new to hibernate. Stuck with below error, any clue?

Caused by: java.lang.NoClassDefFoundError: javax/persistence/ManyToOne
at org.hibernate.cfg.AnnotationConfiguration.addPackage(
at com.concretepage.util.HibernateUtil.<clinit>(
Caused by: java.lang.ClassNotFoundException: javax.persistence.ManyToOne
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

Replied on May 28, 2013
javax/persistence/ManyToOne belongs to hibernate-jpa-2.0-api-1.0.0.Final.jar, you need to add it in your build path.

Write Answer

©2024 | Privacy Policy | Contact Us