java.lang.NoClassDefFoundError: javax/persistence/Persistence

Stack Overflow | Bloodlex | 9 months ago
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Hibernate - No Persistence provider for EntityManager

    Stack Overflow | 9 months ago | Bloodlex
    java.lang.NoClassDefFoundError: javax/persistence/Persistence
  2. 0
    samebug tip
    This exception normally means you either have to add the said class to your dependencies or you miswrote it. Look in the documentation of your library how to add it as a dependency.
  3. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    This was caused by a failure to instantiate Kafka broker. Check your dependencies.
  6. 0
    samebug tip
    NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException


  2. Java RT
    1. Source)
    2. java.lang.ClassLoader.loadClass(Unknown Source)
    3. sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    4. java.lang.ClassLoader.loadClass(Unknown Source)
    4 frames
  3. pl.nombritech.Produktor
    1. pl.nombritech.Produktor.Main.<clinit>(
    1 frame
  4. Java RT
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Unknown Source)
    2 frames
  5. com.sun.javafx
    1. com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$156(
    2. com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(
    3. com.sun.javafx.application.PlatformImpl.lambda$null$173(
    3 frames
  6. Java RT
    1. Method)
    1 frame
  7. com.sun.javafx
    1. com.sun.javafx.application.PlatformImpl.lambda$runLater$174(
    1 frame
    2. Method)
    3 frames
  9. Java RT
    1. Source)
    1 frame