java.lang.NoClassDefFoundError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

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

  • GitHub comment 1349#248795433
    via GitHub by HosiYuki
    ,
  • 1.0.0RC1 failed to get _meta
    via GitHub by peakji
    ,
  • Cant connect to mongodb
    via GitHub by Crossener
    ,
  • Error creating index on elastic search
    via Stack Overflow by Boti
    ,
    • java.lang.NoClassDefFoundError: org/apache/avro/io/DatumReader at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658) at java.lang.Class.getDeclaredConstructors(Class.java:2007) at org.apache.reef.tang.util.ReflectionUtilities.getNamedParameterTargetOrNull(ReflectionUtilities.java:311) at org.apache.reef.tang.implementation.java.ClassHierarchyImpl.buildPathToNode(ClassHierarchyImpl.java:207) at org.apache.reef.tang.implementation.java.ClassHierarchyImpl.registerClass(ClassHierarchyImpl.java:387) at org.apache.reef.tang.implementation.java.ClassHierarchyImpl.register(ClassHierarchyImpl.java:331) at org.apache.reef.tang.implementation.java.ClassHierarchyImpl.getNode(ClassHierarchyImpl.java:257) at org.apache.reef.tang.implementation.java.InjectorImpl.parseDefaultImplementation(InjectorImpl.java:375) at org.apache.reef.tang.implementation.java.InjectorImpl.buildInjectionPlan(InjectorImpl.java:449) at org.apache.reef.tang.implementation.java.InjectorImpl.filterCandidateConstructors(InjectorImpl.java:193) at org.apache.reef.tang.implementation.java.InjectorImpl.buildClassNodeInjectionPlan(InjectorImpl.java:277) at org.apache.reef.tang.implementation.java.InjectorImpl.buildInjectionPlan(InjectorImpl.java:452) at org.apache.reef.tang.implementation.java.InjectorImpl.getInjectionPlan(InjectorImpl.java:472) at org.apache.reef.tang.implementation.java.InjectorImpl.getInstance(InjectorImpl.java:514) at org.apache.reef.tang.implementation.java.InjectorImpl.getInstance(InjectorImpl.java:533) at org.apache.reef.runtime.common.REEFLauncher.getREEFLauncher(REEFLauncher.java:106) at org.apache.reef.runtime.common.REEFLauncher.main(REEFLauncher.java:167) Caused by: java.lang.ClassNotFoundException: org.apache.avro.io.DatumReader at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 18 more

    Users with the same issue

    andyglickandyglick
    18 times, last one,
    Nikolay RybakNikolay Rybak
    1 times, last one,
    treefolktreefolk
    6 times, last one,
    HronomHronom
    6 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1195 more bugmates