java.lang.reflect.InvocationTargetException

GitHub | danielfernandez | 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. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Apache Camel route definition in Spring XML and run with SpringBoot

    Stack Overflow | 1 year ago | xlogger
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
  4. 0

    Gradle: Build 'fat jar' with Spring Boot Dependencies

    codegur.com | 12 months ago
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    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 ReactiveWebApplicationContext due to missing ReactiveHttpServerFactory bean.

      at org.springframework.boot.context.embedded.ReactiveWebApplicationContext.getReactiveHttpServerFactory()
    2. Spring Boot
      ReactiveWebApplicationContext.onRefresh
      1. org.springframework.boot.context.embedded.ReactiveWebApplicationContext.getReactiveHttpServerFactory(ReactiveWebApplicationContext.java:84)
      2. org.springframework.boot.context.embedded.ReactiveWebApplicationContext.createReactiveHttpServer(ReactiveWebApplicationContext.java:70)
      3. org.springframework.boot.context.embedded.ReactiveWebApplicationContext.onRefresh(ReactiveWebApplicationContext.java:49)
      3 frames
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535)
      1 frame
    4. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
      2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)
      3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
      5 frames
    5. thymeleafsandbox.springreactive.application
      Application.main
      1. thymeleafsandbox.springreactive.application.Application.main(Application.java:33)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    7. Spring Boot Maven Plugin
      AbstractRunMojo$LaunchRunner.run
      1. org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:483)
      1 frame
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame