java.lang.NoClassDefFoundError

tip

Look if your classpath is correct, and check if the versions of your libraries match the version you described in your pom.xml

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

  • GitHub comment 1#32762004
    via GitHub by kristiank
    ,
  • ant binary does not find junit
    via GitHub by russel
    ,
  • GitHub comment 9#38491204
    via GitHub by russel
    ,
  • GitHub comment 49#161179940
    via GitHub by jaimeyu
    ,
  • Struts2 Hello World jsp example error
    via Stack Overflow by lulu88
    ,
  • mvn clean failing on junit tests.
    via by google_user,
    • java.lang.NoClassDefFoundError: junit/framework/JUnit4TestAdapterCache at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:787) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:447) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:188) at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    junior_cEngineer
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    164 more bugmates