java.lang.ClassNotFoundException

tip

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

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

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.

  • simple JUnit test assertTrue(true) fails
    via Stack Overflow by Arfs
    ,
  • Apache NiFi Developer List - Trouble with RPMs
    via by Unknown author,
  • I am getting the following error message when one of the steps in my reducer exceeds the in memory limit and has to spill records to a temp file. It appears this is because the jug-lgpl-2.0.0.jar is not included in the distributed cache deployment of Kettle in the Hadoop cluster. Work around is to manually add this JAR to the lib directory of Kettle in Hadoop's distributed cache. 2012/06/01 21:33:00 - Pentaho MapReduce - ERROR (version 4.3.0, build 1 from 2012-04-12 17.12.40 by buildguy) : [FAILED] -- Task: 3 Attempt: 2 Event: 48 2012/06/01 21:33:00 - Pentaho MapReduce - ERROR (version 4.3.0, build 1 from 2012-04-12 17.12.40 by buildguy) : Error: java.lang.ClassNotFoundException: org.safehaus.uuid.UUIDGenerator 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:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.pentaho.di.core.util.UUIDUtil.<clinit>(UUIDUtil.java:53) at org.pentaho.di.core.vfs.KettleVFS.createTempFile(KettleVFS.java:353) at org.pentaho.di.trans.steps.sort.SortRows.sortExternalRows(SortRows.java:144) at org.pentaho.di.trans.steps.sort.SortRows.addBuffer(SortRows.java:127) at org.pentaho.di.trans.steps.sort.SortRows.processRow(SortRows.java:374) at org.pentaho.di.trans.SingleThreadedTransExecutor.oneIteration(SingleThreadedTransExecutor.java:342) at org.pentaho.hadoop.mapreduce.GenericTransReduce.reduce(GenericTransReduce.java:133) at org.pentaho.hadoop.m
    via by Chris Deptula,
  • I am getting the following error message when one of the steps in my reducer exceeds the in memory limit and has to spill records to a temp file. It appears this is because the jug-lgpl-2.0.0.jar is not included in the distributed cache deployment of Kettle in the Hadoop cluster. Work around is to manually add this JAR to the lib directory of Kettle in Hadoop's distributed cache. 2012/06/01 21:33:00 - Pentaho MapReduce - ERROR (version 4.3.0, build 1 from 2012-04-12 17.12.40 by buildguy) : [FAILED] -- Task: 3 Attempt: 2 Event: 48 2012/06/01 21:33:00 - Pentaho MapReduce - ERROR (version 4.3.0, build 1 from 2012-04-12 17.12.40 by buildguy) : Error: java.lang.ClassNotFoundException: org.safehaus.uuid.UUIDGenerator 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:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at org.pentaho.di.core.util.UUIDUtil.<clinit>(UUIDUtil.java:53) at org.pentaho.di.core.vfs.KettleVFS.createTempFile(KettleVFS.java:353) at org.pentaho.di.trans.steps.sort.SortRows.sortExternalRows(SortRows.java:144) at org.pentaho.di.trans.steps.sort.SortRows.addBuffer(SortRows.java:127) at org.pentaho.di.trans.steps.sort.SortRows.processRow(SortRows.java:374) at org.pentaho.di.trans.SingleThreadedTransExecutor.oneIteration(SingleThreadedTransExecutor.java:342) at org.pentaho.hadoop.mapreduce.GenericTransReduce.reduce(GenericTransReduce.java:133) at org.pentaho.hadoop.m
    via by Chris Deptula,
  • NoClassDefFoundError: org/slf4j/Logger
    via Stack Overflow by Stephen McKain
    ,
  • GitHub comment 10#285905393
    via GitHub by at15
    ,
    • java.lang.ClassNotFoundException: org.slf4j.Logger 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:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    CasperCasper
    4 times, last one,
    HandemelindoHandemelindo
    1 times, last one,
    2285 more bugmates