java.lang.NoClassDefFoundError

javax/persistence/Persistence


Samebug tips9

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web3969

Solution icon of oraclecommunity
via Oracle Community by Stuart Fleming, 6 months ago
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Solution icon of oraclecommunity
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Solution icon of web
javax/persistence/Persistence

Solution icon of coderanch
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Solution icon of stackoverflow
javax/persistence/Persistence

Stack trace

  • java.lang.NoClassDefFoundError: javax/persistence/Persistence at in_jpa_db_objects.JavaServiceFacade.<init>(JavaServiceFacade.java:19) at util_import_factory.OraConnInput.OraCleaner(OraConnInput.java:43) at startup.startImport.processIncomingXMLs(startImport.java:49) at startup.startAll.startupProcesses(startAll.java:92) at commandLineStartup.main(commandLineStartup.java:23) Caused by: java.lang.ClassNotFoundException: javax.persistence.Persistence at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:305) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:246) ... 5 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 2 days ago
4 times, 3 days ago
2381 more bugmates