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

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.

tip

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.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

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.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

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.

  • Dragon Attack Crash
    ,
  • Краш FTB — PasteBin
    via by Unknown author,
  • Server Error on Startup [0.8]
    via GitHub by eavab
    ,
  • Crash on load #691
    via GitHub by luffykick
    ,
  • Server crashes, won't start.
    via GitHub by fireiscoal
    ,
    • java.lang.NoClassDefFoundError: org/apache/commons/lang3/RandomUtils at com.httymd.util.DragonDamageSource.getDirectDamage(DragonDamageSource.java:37) at com.httymd.entity.EntityDragon.func_70652_k(EntityDragon.java:86) at net.minecraft.entity.ai.EntityAIAttackOnCollide.func_75246_d(EntityAIAttackOnCollide.java:148) at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:103) at net.minecraft.entity.EntityLiving.func_70619_bc(EntityLiving.java:540) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:1772) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:367) at net.minecraft.entity.EntityAgeable.func_70636_d(SourceFile:95) at net.minecraft.entity.passive.EntityAnimal.func_70636_d(SourceFile:37) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1609) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:206) at net.minecraft.world.World.func_72866_a(World.java:2070) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648) at net.minecraft.world.World.func_72870_g(World.java:2034) at WorldServerOF.func_72870_g(WorldServerOF.java:347) at net.minecraft.world.World.func_72939_s(World.java:1887) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:186) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.RandomUtils at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:106) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 22 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2285 more bugmates