PDA

View Full Version : Help: java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil


Sandeepgowda
30-11-2009, 02:04 PM
hi,
i am using org.hibernate.ejb.HibernatePersistence as JPA provider, getting some exception as below,

Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/spi/ProviderUtil
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at javax.persistence.Persistence.findAllProviders(Persistence.java:112)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at SessionFactory.HibernateLogin.main(HibernateLogin.java:131)
Caused by: java.lang.ClassNotFoundException: javax.persistence.spi.ProviderUtil
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
... 9 more

Can you please help me.

regards
Sandeep Gowda

vseehua
30-11-2009, 02:20 PM
Thread moved to the Programming section of the forum, in addition, I'll repeat my comments in past threads:
pedjasmek, I think you may have come to the wrong forum for your querries. JPA, within the context of this forum, means Jabatan Perkhidmatan Awam in Malaysia, and usually usually used referring to the scholarships offered by that body.

As thus, I don't think many of us knows how to deal with Java Persistent API codes. I will leave this thread open, and see if anyone has the answers to your queries.