[ 
https://issues.apache.org/jira/browse/CAMEL-11756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164325#comment-16164325
 ] 

Claus Ibsen edited comment on CAMEL-11756 at 9/13/17 8:42 AM:
--------------------------------------------------------------

If you run this example you get a spring boot 2 error
{code}
examples/camel-example-spring-boot-supervising-route-controller (boot2)/$  mvn 
spring-boot:run -Pspring-boot2
[INFO] --- spring-boot-maven-plugin:2.0.0.M3:run (default-cli) @ 
camel-example-spring-boot-supervising-route-controller ---
[WARNING]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: 
org.springframework.boot.SpringApplication.run(Ljava/lang/Object;[Ljava/lang/String;)Lorg/springframework/context/ConfigurableApplicationContext;
        at sample.camel.Application.main(Application.java:33)
        ... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.039 s
[INFO] Finished at: 2017-09-13T10:38:01+02:00
[INFO] Final Memory: 53M/1019M
[INFO] ------------------------------------------------------------------------
{code}

I checked the classpath, and there is only Spring Boot 2 and Spring Framework 5 
JARs.
{code}
camel/examples/camel-example-spring-boot-supervising-route-controller (boot2)/$ 
mvn dependency:tree -P spring-boot2
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel :: Example :: Spring Boot :: Supervising Route Controller 
2.20.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ 
camel-example-spring-boot-supervising-route-controller ---
[INFO] 
org.apache.camel.example:camel-example-spring-boot-supervising-route-controller:jar:2.20.0-SNAPSHOT
[INFO] +- org.jolokia:jolokia-core:jar:1.3.7:compile
[INFO] |  \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.0.M3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.0.0.M3:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-logging:jar:2.0.0.M3:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.22:compile
[INFO] |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.22:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.18:runtime
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-json:jar:2.0.0.M3:compile
[INFO] |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.0.pr4:compile
[INFO] |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.0.pr4:compile
[INFO] |  |  +- 
com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.0.pr4:compile
[INFO] |  |  \- 
com.fasterxml.jackson.module:jackson-module-kotlin:jar:2.9.0.pr4:compile
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.0.M3:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.16:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.16:compile
[INFO] |  |  \- 
org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.16:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.4.1.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.0.RC3:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.0.0.RC3:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.0.RC3:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.0.0.RC3:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.0.RC3:compile
[INFO] +- 
org.springframework.boot:spring-boot-starter-undertow:jar:2.0.0.M3:compile
[INFO] |  +- io.undertow:undertow-core:jar:1.4.18.Final:compile
[INFO] |  |  +- org.jboss.xnio:xnio-api:jar:3.3.8.Final:compile
[INFO] |  |  \- org.jboss.xnio:xnio-nio:jar:3.3.8.Final:runtime
[INFO] |  +- io.undertow:undertow-servlet:jar:1.4.18.Final:compile
[INFO] |  |  \- 
org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] |  +- io.undertow:undertow-websockets-jsr:jar:1.4.18.Final:compile
[INFO] |  |  \- 
org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:jar:1.1.0.Final:compile
[INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  \- org.glassfish:javax.el:jar:3.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-actuator:jar:2.0.0.M3:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.0.M3:compile
[INFO] |  +- 
org.springframework.boot:spring-boot-autoconfigure:jar:2.0.0.M3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.1:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.1:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.1:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.0.RC3:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.0.RC3:compile
[INFO] |  \- org.springframework:spring-context:jar:5.0.0.RC3:compile
[INFO] +- 
org.springframework.boot:spring-boot-configuration-processor:jar:2.0.0.M3:compile
[INFO] |  \- 
com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] +- org.apache.camel:camel-spring-boot-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-spring-boot:jar:2.20.0-SNAPSHOT:compile
[INFO] |     \- 
org.apache.camel:camel-spring-boot-common:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.apache.camel:camel-undertow-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  +- org.apache.camel:camel-undertow:jar:2.20.0-SNAPSHOT:compile
[INFO] |  |  +- org.apache.camel:camel-core:jar:2.20.0-SNAPSHOT:compile
[INFO] |  |  \- org.apache.camel:camel-http-common:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-core-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.apache.camel:camel-stream-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-stream:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.0.M3:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.0.0.M3:test
[INFO] |  +- 
org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.0.M3:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  +- net.minidev:json-smart:jar:2.3:test
[INFO] |  |  |  \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |  |     \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.22:compile
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:3.8.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.5.0:test
[INFO] |  \- org.springframework:spring-test:jar:5.0.0.RC3:test
[INFO] +- org.apache.camel:camel-test-spring:jar:2.20.0-SNAPSHOT:test
[INFO] |  +- org.apache.camel:camel-test:jar:2.20.0-SNAPSHOT:test
[INFO] |  \- org.apache.camel:camel-spring:jar:2.20.0-SNAPSHOT:compile
[INFO] |     \- org.springframework:spring-tx:jar:5.0.0.RC3:compile
[INFO] +- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile
[INFO] \- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile
{code}

The example is just a standard spring boot example with a application class
https://github.com/apache/camel/tree/boot2/examples/camel-example-spring-boot-supervising-route-controller

Not sure what is going on, but there is an upcoming M4 release of Spring Boot 2 
in the works


was (Author: davsclaus):
If you run this example you get a spring boot 2 error
{code}
examples/camel-example-spring-boot-supervising-route-controller (boot2)/$  mvn 
spring-boot:run -Pspring-boot2
{code}
[INFO] --- spring-boot-maven-plugin:2.0.0.M3:run (default-cli) @ 
camel-example-spring-boot-supervising-route-controller ---
[WARNING]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: 
org.springframework.boot.SpringApplication.run(Ljava/lang/Object;[Ljava/lang/String;)Lorg/springframework/context/ConfigurableApplicationContext;
        at sample.camel.Application.main(Application.java:33)
        ... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.039 s
[INFO] Finished at: 2017-09-13T10:38:01+02:00
[INFO] Final Memory: 53M/1019M
[INFO] ------------------------------------------------------------------------
{code}

I checked the classpath, and there is only Spring Boot 2 and Spring Framework 5 
JARs.
{code}
camel/examples/camel-example-spring-boot-supervising-route-controller (boot2)/$ 
mvn dependency:tree -P spring-boot2
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Camel :: Example :: Spring Boot :: Supervising Route Controller 
2.20.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ 
camel-example-spring-boot-supervising-route-controller ---
[INFO] 
org.apache.camel.example:camel-example-spring-boot-supervising-route-controller:jar:2.20.0-SNAPSHOT
[INFO] +- org.jolokia:jolokia-core:jar:1.3.7:compile
[INFO] |  \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.0.M3:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.0.0.M3:compile
[INFO] |  |  +- 
org.springframework.boot:spring-boot-starter-logging:jar:2.0.0.M3:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.22:compile
[INFO] |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.22:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.18:runtime
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-json:jar:2.0.0.M3:compile
[INFO] |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.0.pr4:compile
[INFO] |  |  +- 
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.0.pr4:compile
[INFO] |  |  +- 
com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.0.pr4:compile
[INFO] |  |  \- 
com.fasterxml.jackson.module:jackson-module-kotlin:jar:2.9.0.pr4:compile
[INFO] |  +- 
org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.0.M3:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.16:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.16:compile
[INFO] |  |  \- 
org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.16:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.4.1.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] |  +- org.springframework:spring-web:jar:5.0.0.RC3:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.0.0.RC3:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.0.0.RC3:compile
[INFO] |     +- org.springframework:spring-aop:jar:5.0.0.RC3:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.0.0.RC3:compile
[INFO] +- 
org.springframework.boot:spring-boot-starter-undertow:jar:2.0.0.M3:compile
[INFO] |  +- io.undertow:undertow-core:jar:1.4.18.Final:compile
[INFO] |  |  +- org.jboss.xnio:xnio-api:jar:3.3.8.Final:compile
[INFO] |  |  \- org.jboss.xnio:xnio-nio:jar:3.3.8.Final:runtime
[INFO] |  +- io.undertow:undertow-servlet:jar:1.4.18.Final:compile
[INFO] |  |  \- 
org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] |  +- io.undertow:undertow-websockets-jsr:jar:1.4.18.Final:compile
[INFO] |  |  \- 
org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:jar:1.1.0.Final:compile
[INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  \- org.glassfish:javax.el:jar:3.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-actuator:jar:2.0.0.M3:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.0.0.M3:compile
[INFO] |  +- 
org.springframework.boot:spring-boot-autoconfigure:jar:2.0.0.M3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.1:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.1:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.1:compile
[INFO] |  +- org.springframework:spring-core:jar:5.0.0.RC3:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.0.0.RC3:compile
[INFO] |  \- org.springframework:spring-context:jar:5.0.0.RC3:compile
[INFO] +- 
org.springframework.boot:spring-boot-configuration-processor:jar:2.0.0.M3:compile
[INFO] |  \- 
com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] +- org.apache.camel:camel-spring-boot-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-spring-boot:jar:2.20.0-SNAPSHOT:compile
[INFO] |     \- 
org.apache.camel:camel-spring-boot-common:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.apache.camel:camel-undertow-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  +- org.apache.camel:camel-undertow:jar:2.20.0-SNAPSHOT:compile
[INFO] |  |  +- org.apache.camel:camel-core:jar:2.20.0-SNAPSHOT:compile
[INFO] |  |  \- org.apache.camel:camel-http-common:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-core-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.apache.camel:camel-stream-starter:jar:2.20.0-SNAPSHOT:compile
[INFO] |  \- org.apache.camel:camel-stream:jar:2.20.0-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.0.M3:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.0.0.M3:test
[INFO] |  +- 
org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.0.M3:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  +- net.minidev:json-smart:jar:2.3:test
[INFO] |  |  |  \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |  |     \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.22:compile
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:3.8.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.5.0:test
[INFO] |  \- org.springframework:spring-test:jar:5.0.0.RC3:test
[INFO] +- org.apache.camel:camel-test-spring:jar:2.20.0-SNAPSHOT:test
[INFO] |  +- org.apache.camel:camel-test:jar:2.20.0-SNAPSHOT:test
[INFO] |  \- org.apache.camel:camel-spring:jar:2.20.0-SNAPSHOT:compile
[INFO] |     \- org.springframework:spring-tx:jar:5.0.0.RC3:compile
[INFO] +- com.sun.xml.bind:jaxb-core:jar:2.2.11:compile
[INFO] \- com.sun.xml.bind:jaxb-impl:jar:2.2.11:compile
{code}

The example is just a standard spring boot example with a application class
https://github.com/apache/camel/tree/boot2/examples/camel-example-spring-boot-supervising-route-controller

Not sure what is going on, but there is an upcoming M4 release of Spring Boot 2 
in the works

> camel-spring-boot2 - Create experimental spring boot 2 component
> ----------------------------------------------------------------
>
>                 Key: CAMEL-11756
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11756
>             Project: Camel
>          Issue Type: Task
>          Components: camel-spring-boot
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>
> We should try get started with the migration effort for getting Camel running 
> on Spring Boot 2.0.x.
> There may be issues with the starter component as Spring Boot guys changed 
> stuff how auto configuration and setting properties works. So we may need to 
> have some kind of interface in camel-spring-boot and camel-spring-boot2 where 
> we can have different implementation that the -starter can use.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to