java.lang.NoClassDefFoundError

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

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

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.

  • Re: Class Not Found exception when rebuilding with latest snapshot
    via by JohanDoornenbal@filternet.nl,
  • antlr version
    via by Pavel Tavoda,
  • 1.0.0RC1 failed to get _meta
    via GitHub by peakji
    ,
  • Cant connect to mongodb
    via GitHub by Crossener
    ,
  • Error creating index on elastic search
    via Stack Overflow by Boti
    ,
    • java.lang.NoClassDefFoundError: org/apache/commons/mail/EmailException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) at java.lang.Class.getDeclaredConstructors(Class.java:1853) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:845) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853) at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:46) at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:50) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:133) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) at com.google.inject.Guice.createInjector(Guice.java:95) at com.google.inject.Guice.createInjector(Guice.java:72) at com.google.inject.Guice.createInjector(Guice.java:62) at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:249) at org.apache.wicket.Application.initApplication(Application.java:823) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:424) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.apache.isis.core.webserver.WebServerBootstrapper.bootstrap(WebServerBootstrapper.java:85) at org.apache.isis.core.webserver.WebServer.run(WebServer.java:103) at org.apache.isis.core.webserver.WebServer.main(WebServer.java:67) at org.apache.isis.WebServer.main(WebServer.java:25) Caused by: java.lang.ClassNotFoundException: org.apache.commons.mail.EmailException 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 37 more

    Users with the same issue

    andyglickandyglick
    18 times, last one,
    Nikolay RybakNikolay Rybak
    1 times, last one,
    treefolktreefolk
    6 times, last one,
    HronomHronom
    6 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1195 more bugmates