org.springframework.context.ApplicationContextException

Unable to start embedded container; nested exception is java.lang.NoClassDefFoundError: io/netty/channel/ChannelHandler

Samebug tips8

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.

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.

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

Solutions on the web776

  • via GitHub by yburkouski
    , 10 months ago
    Unable to start embedded container; nested exception is java.lang.NoClassDefFoundError: io/netty/channel/ChannelHandler
  • Unable to start embedded container; nested exception is java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/web/ErrorPage
  • Unable to start embedded container; nested exception is java.lang.NoClassDefFoundError: org/eclipse/jetty/server/handler/ContextHandler$NoContext
  • Stack trace

    • org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoClassDefFoundError: io
    • etty/channel/ChannelHandler at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh(ReactiveWebApplicationContext.java:52)[classes/:1.4.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535)[spring-context-5.0.0.M1.jar:5.0.0.M1] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT] at sample.web.reactive.ReactiveSampleApplication.main(ReactiveSampleApplication.java:11)[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_66] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)[idea_rt.jar:na] Caused by: java.lang.NoClassDefFoundError: io
    • etty/channel/ChannelHandler at org.springframework.boot.context.embedded.ReactorEmbeddedReactiveHttpServer.afterPropertiesSet(ReactorEmbeddedReactiveHttpServer.java:36)[classes/:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.context.embedded.ReactorEmbeddedHttpServerFactory.getReactiveHttpServer(ReactorEmbeddedHttpServerFactory.java:33)[classes/:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.createReactiveHttpServer(ReactiveWebApplicationContext.java:74)[classes/:1.4.0.BUILD-SNAPSHOT] at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh(ReactiveWebApplicationContext.java:49)[classes/:1.4.0.BUILD-SNAPSHOT] ... 12 more Caused by: java.lang.ClassNotFoundException: io.netty.channel.ChannelHandler at java.net.URLClassLoader.findClass(URLClassLoader.java:381)[na:1.8.0_66] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_66] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_66] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_66] ... 16 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 year ago
    2 times, 15 hours ago
    17 times, 4 days ago
    Unknown user
    Once, 1 week ago
    Once, 1 week ago
    2420 more bugmates