java.lang.NoClassDefFoundError

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.

  • JSystem 6.0 Agent doesn't run.
    via jsystemtest by yamaduc
    ,
  • Configuring Gradle with Kotlin
    via Stack Overflow by Filip Zymek
    ,
  • I don't know why. help me :(
    via GitHub by hjbaek
    ,
  • Issue 1706 in zxing: JAVA2SE client not working
    via by zx...@googlecode.com,
  • Has this changed?
    via by Unknown author,
  • Kotlinに手を出してみる - 日々常々
    via by Unknown author,
  • Kotlinの概要とモバイルアプリ開発 - Qiita
    via by Unknown author,
    • java.lang.NoClassDefFoundError: org/apache
    • aming/TransactionRef at org.apache.catalina.core.StandardServer.<init>(StandardServer.java:83) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:374) at java.lang.Class.newInstance(Class.java:327) at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205) at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561) at org.apache.catalina.startup.Catalina.load(Catalina.java:490) at org.apache.catalina.startup.Catalina.load(Catalina.java:524) at com.ignis.embeddedcatalina.EmbeddedCatalina.loadCatalina(EmbeddedCatalina.java:131) at com.ignis.embeddedcatalina.EmbeddedCatalina.init(EmbeddedCatalina.java:84) at jsystem.runner.agent.server.RunnerAgentMain.initAgent(RunnerAgentMain.java:90) at jsystem.runner.agent.server.RunnerAgentMain.run(RunnerAgentMain.java:61) at jsystem.runner.agent.server.RunnerAgentMain.startRunner(RunnerAgentMain.java:108) at jsystem.framework.launcher.Launcher2.run(Launcher2.java:78) at jsystem.framework.launcher.Launcher2.main(Launcher2.java:31) Caused by: java.lang.ClassNotFoundException: org.apache.naming.TransactionRef 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) ... 31 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Nikolay Rybak
    3 times, last one,
    Unknown visitor1 times, last one,
    2285 more bugmates