org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.springframework.http.server.reactive.ServletHttpHandlerAdapter: method <init>()V not found

Spring JIRA | Tzachi Strugo | 4 months ago
  1. 0

    Spring boot failing to start up while using experimental spring reactive from below reason org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.springframework.http.server.reactive.ServletHttpHandlerAdapter: method <init>()V not found at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh(ReactiveWebApplicationContext.java:52) ~[spring-boot-autoconfigure-web-reactive-0.1.0.BUILD-20160804.004532-18.jar:1.4.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535) ~[spring-context-5.0.0.BUILD-20160809.192615-131.jar:5.0.0.BUILD-SNAPSHOT] 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] it seems like a problem of un synchronisation between jars of Spring-web and spring-boot-autoconfigure-web-rective projects. dependency tree: [INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ rectiveprojectdemo --- [INFO] com.behalf.learning.reactive:rectiveprojectdemo:jar:0.0.1-SNAPSHOT [INFO] +- org.springframework.boot.experimental:spring-boot-starter-web-reactive:jar:0.1.0.BUILD-SNAPSHOT:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile [INFO] | | | \- org.springframework:spring-context:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | | +- org.springframework:spring-aop:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | | +- org.springframework:spring-beans:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | | \- org.springframework:spring-expression:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.0.RELEASE:compile [INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.7:compile [INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.7:compile [INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile [INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile [INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime [INFO] | +- org.springframework.boot.experimental:spring-boot-autoconfigure-web-reactive:jar:0.1.0.BUILD-SNAPSHOT:compile [INFO] | | +- org.springframework:spring-web-reactive:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | | \- org.springframework:spring-web:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | | \- io.netty:netty-buffer:jar:4.1.3.Final:compile [INFO] | | \- io.netty:netty-common:jar:4.1.3.Final:compile [INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.0.RELEASE:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.4:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.4:compile [INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.4:compile [INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:compile [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile [INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.4.0.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test:jar:1.4.0.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.0.RELEASE:test [INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test [INFO] | | +- net.minidev:json-smart:jar:2.2.1:test [INFO] | | | \- net.minidev:accessors-smart:jar:1.1:test [INFO] | | | \- org.ow2.asm:asm:jar:5.0.3:test [INFO] | | \- org.slf4j:slf4j-api:jar:1.7.21:compile [INFO] | +- junit:junit:jar:4.12:test [INFO] | +- org.assertj:assertj-core:jar:2.5.0:test [INFO] | +- org.mockito:mockito-core:jar:1.10.19:test [INFO] | | \- org.objenesis:objenesis:jar:2.1:test [INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test [INFO] | +- org.skyscreamer:jsonassert:jar:1.3.0:test [INFO] | | \- org.json:json:jar:20140107:test [INFO] | +- org.springframework:spring-core:jar:5.0.0.BUILD-SNAPSHOT:compile [INFO] | \- org.springframework:spring-test:jar:5.0.0.BUILD-SNAPSHOT:test [INFO] +- io.projectreactor:reactor-core:jar:3.0.0.BUILD-SNAPSHOT:compile [INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.0:compile [INFO] \- org.projectlombok:lombok:jar:1.16.10:compile [INFO] ---------------------------------------------------

    Spring JIRA | 4 months ago | Tzachi Strugo
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.springframework.http.server.reactive.ServletHttpHandlerAdapter: method <init>()V not found
  2. 0

    Error after creating a service with Grails 3.0.7

    GitHub | 1 year ago | vitgou
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    spring boot giving strange error when running as a war in tomcat in version 1.3.0.M5

    Stack Overflow | 1 year ago | Gaurav Rawat
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
  5. 0

    GitHub comment 391#158454836

    GitHub | 1 year ago | hakanernam
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.context.ApplicationContextException

      Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.springframework.http.server.reactive.ServletHttpHandlerAdapter: method <init>()V not found

      at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh()
    2. Spring Boot
      ReactiveWebApplicationContext.onRefresh
      1. org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh(ReactiveWebApplicationContext.java:52)[spring-boot-autoconfigure-web-reactive-0.1.0.BUILD-20160804.004532-18.jar:1.4.0.BUILD-SNAPSHOT]
      1 frame
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535)[spring-context-5.0.0.BUILD-20160809.192615-131.jar:5.0.0.BUILD-SNAPSHOT]
      1 frame
    4. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT]
      2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT]
      3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT]
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT]
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.BUILD-20160728.175440-591.jar:1.4.0.BUILD-SNAPSHOT]
      5 frames