java.lang.NoClassDefFoundError

org/json/simple/JSONObject at org.apache.hadoop.chukwa.inputtools.log4j.Log4JMetricsContext.emitRecord(Log4J MetricsContext.java:102) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.emitRecords(AbstractMetri csContext.java:306) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.timerEvent(AbstractMetric sContext.java:292) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.access$000(AbstractMetric sContext.java:52) at org.apache.hadoop.metrics.spi.AbstractMetricsContext$1.run(AbstractMetricsCont ext.java:251)

Samebug tips8

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

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web20890

  • via hadoop-chukwa-user by Eric Yang, 9 months ago
    csContext.java:306) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.timerEvent(AbstractMetric sContext.java:292) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.access$000(AbstractMetric sContext.java:52) at org.apache.hadoop.metrics.spi.AbstractMetricsContext$1.run(AbstractMetricsCont ext.java:251)
  • via Oracle Community by Pratik, 1 year ago
    :124) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) [java] at java.net.URLClassLoader.access$000(URLClassLoader.java:56) [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:195) [java] at
  • org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:47) at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:81) at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40) at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:63) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
  • Stack trace

    • java.lang.NoClassDefFoundError: org/json/simple/JSONObject at org.apache.hadoop.chukwa.inputtools.log4j.Log4JMetricsContext.emitRecord(Log4J MetricsContext.java:102) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.emitRecords(AbstractMetri csContext.java:306) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.timerEvent(AbstractMetric sContext.java:292) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.access$000(AbstractMetric sContext.java:52) at org.apache.hadoop.metrics.spi.AbstractMetricsContext$1.run(AbstractMetricsCont ext.java:251) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONObject 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) ... 2 more

    Write tip

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

    Users with the same issue

    Unknown user
    Once, 1 week ago
    4 times, 1 month ago
    Once, 1 month ago
    Unknown user
    Once, 2 months ago
    Unknown user
    Once, 2 months ago
    1189 more bugmates