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.

  • GitHub comment 3#143670258
    via GitHub by feiniao0308
    ,
  • GitHub comment 3#143670258
    via GitHub by feiniao0308
    ,
  • Issues/1.4.5 – Minecraft Wiki
    via by Unknown author,
  • When I run the workbench.bat script in Windows I get the following error DEBUG: Using JAVA_HOME DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files (x86)\Java\jre6 DEBUG: _PENTAHO_JAVA=C:\Program Files (x86)\Java\jre6\bin\java 14:58:04,747 ERROR [Workbench] main java.lang.NoClassDefFoundError: org/scannotation/AnnotationDB at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(Ba sePluginType.java:237) at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePlu ginType.java:500) at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginTy pe.java:115) at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:4 20) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:121 ) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:68) at mondrian.gui.Workbench.getDbMeta(Workbench.java:1225) at mondrian.gui.Workbench.loadDatabaseMeta(Workbench.java:193) at mondrian.gui.Workbench.<init>(Workbench.java:132) at mondrian.gui.Workbench.main(Workbench.java:2094) Caused by: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB 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) ... 10 more Press any key to continue . . . workbench.sh script starts workbench.
    via by Golda David,
  • When starting PEC the following stack trace appears: java.lang.NoClassDefFoundError: org/scannotation/AnnotationDB at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:225) at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:485) at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:105) at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:410) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:78) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:42) at com.pentaho.pac.server.StartupListener.contextInitialized(SourceFile:34) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.pentaho.pac.server.JettyServer.startServer(JettyServer.java:152) at org.pentaho.pac.server.JettyServer.<init>(JettyServer.java:89) at com.pentaho.pac.server.ProJettyServer.<init>(SourceFile:31) at com.pentaho.pac.server.ProJettyServer.main(SourceFile:118) Caused by: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 20 more The issue is that the version of PEC being shipped with PDI-EE does not currently contain the scannotation jar.
    via by Curtis Boyden,
  • When starting PEC the following stack trace appears: java.lang.NoClassDefFoundError: org/scannotation/AnnotationDB at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:225) at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:485) at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:105) at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:410) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:78) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:42) at com.pentaho.pac.server.StartupListener.contextInitialized(SourceFile:34) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.pentaho.pac.server.JettyServer.startServer(JettyServer.java:152) at org.pentaho.pac.server.JettyServer.<init>(JettyServer.java:89) at com.pentaho.pac.server.ProJettyServer.<init>(SourceFile:31) at com.pentaho.pac.server.ProJettyServer.main(SourceFile:118) Caused by: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 20 more The issue is that the version of PEC being shipped with PDI-EE does not currently contain the scannotation jar.
    via by Curtis Boyden,
    • java.lang.NoClassDefFoundError: com/github/jknack/handlebars/HandlebarsError at com.github.jknack.handlebars.internal.Partial.merge(Partial.java:134) at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:130) at com.github.jknack.handlebars.internal.TemplateList.merge(TemplateList.java:71) at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:130) at com.github.jknack.handlebars.internal.BaseTemplate.apply(BaseTemplate.java:117) at com.github.jknack.handlebars.internal.ForwardingTemplate.apply(ForwardingTemplate.java:82) at com.github.jknack.handlebars.internal.ForwardingTemplate.apply(ForwardingTemplate.java:60) at com.github.bogdanlivadariu.reporting.testng.builder.TestNgReportBuilder.writeTestCaseSummaryReport(TestNgReportBuilder.java:98) at com.github.bogdanlivadariu.reporting.testng.builder.TestNgReportBuilder.writeReportsOnDisk(TestNgReportBuilder.java:110) at com.github.bogdanlivadariu.jenkins.reporting.testng.TestNGTestReportPublisher.perform(TestNGTestReportPublisher.java:128) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1527) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) Caused by: java.lang.ClassNotFoundException: com.github.jknack.handlebars.HandlebarsError 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) ... 19 more

    Users with the same issue

    iferca
    1 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