Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10796

Quickstart spring-boot-camel-config with Spring boot 2 does not work - probably unsupported version of spring-cloud-context dependency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • fuse-7.4-GA
    • fuse-7.4-GA
    • FIS-Quickstarts
    • None
    • % %

      Download quickstart spring-boot-camel-config with spring-boot 2 from [1]
      Follow README.md and get error:

      08:17:21.786 [main] ERROR o.s.boot.SpringApplication - Application run failed
      java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:120)
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:84)
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:62)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
      at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
      at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
      at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
      at io.fabric8.quickstarts.camel.config.Application.main(Application.java:30)
      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.loader.MainMethodRunner.run(MainMethodRunner.java:48)
      at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
      at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
      at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

      The same behavior happens if you try to execute quickstart locally by command `mvn spring-boot:run`

      I suspect, that reason of error is a version of spring-cloud-context - 1.1.7.RELEASE,
      which is possibly not compatible with spring boot 2, see similar problem [2]

      [INFO] +- io.fabric8:spring-cloud-kubernetes-core:jar:0.1.6.fuse-740009:compile
      [INFO] | +- org.springframework.cloud:spring-cloud-context:jar:1.1.7.RELEASE:compile

      [1] https://github.com/fabric8-quickstarts/spring-boot-camel-config/releases/tag/spring-boot-camel-config-1.0.fuse-sb2-740002
      [2] https://github.com/spring-cloud/spring-cloud-config/issues/836

              Unassigned Unassigned
              jondruse@redhat.com Jiri Ondrusek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: