Failed to stop bean 'inputBindingLifecycle' with Spring Boot 2.1.5, Spring Cloud Stream Greenwich.SR1 and RocketMQ 0.9.0 - spring-boot

I've seen a similar question here, but it's for an older version. Not sure what the conflicting version is for me, and what I need to use.
I used Spring Initializr to create my project, following the SCS Reference Quick Start. That set me up with my current versions (2.1.5, Greenwich.SR1).
The only dependency I added manually was for RocketMQ, since Spring Initializr couldn't find it. Here's my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
<version>0.9.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-test-support</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
The error in question happens when I try to shut down the application, a process which takes nearly a minute each time. Here's the full stack trace when I shut down the app:
Failed to stop bean 'inputBindingLifecycle'
java.lang.IllegalStateException: Shutdown in progress at
java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:82)
~[na:1.8.0_181] at
java.lang.Runtime.removeShutdownHook(Runtime.java:239) ~[na:1.8.0_181]
at
org.apache.rocketmq.client.trace.AsyncTraceDispatcher.removeShutdownHook(AsyncTraceDispatcher.java:210)
~[rocketmq-client-4.4.0.jar:4.4.0] at
org.apache.rocketmq.client.trace.AsyncTraceDispatcher.shutdown(AsyncTraceDispatcher.java:183)
~[rocketmq-client-4.4.0.jar:4.4.0] at
org.apache.rocketmq.client.consumer.DefaultMQPushConsumer.shutdown(DefaultMQPushConsumer.java:598)
~[rocketmq-client-4.4.0.jar:4.4.0] at
org.springframework.cloud.stream.binder.rocketmq.consuming.RocketMQListenerBindingContainer.stop(RocketMQListenerBindingContainer.java:175)
~[spring-cloud-stream-binder-rocketmq-0.9.0.RELEASE.jar:0.9.0.RELEASE]
at
org.springframework.cloud.stream.binder.rocketmq.integration.RocketMQInboundChannelAdapter.doStop(RocketMQInboundChannelAdapter.java:128)
~[spring-cloud-stream-binder-rocketmq-0.9.0.RELEASE.jar:0.9.0.RELEASE]
at
org.springframework.integration.endpoint.AbstractEndpoint.stop(AbstractEndpoint.java:173)
~[spring-integration-core-5.1.3.RELEASE.jar:5.1.3.RELEASE] at
org.springframework.cloud.stream.binder.DefaultBinding.stop(DefaultBinding.java:127)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binder.DefaultBinding.unbind(DefaultBinding.java:159)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.BindingService.unbindConsumers(BindingService.java:303)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.BindableProxyFactory.unbindInputs(BindableProxyFactory.java:307)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.InputBindingLifecycle.doStopWithBindable(InputBindingLifecycle.java:66)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:608)
~[na:1.8.0_181] at
org.springframework.cloud.stream.binding.AbstractBindingLifecycle.stop(AbstractBindingLifecycle.java:56)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.InputBindingLifecycle.stop(InputBindingLifecycle.java:34)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.AbstractBindingLifecycle.stop(AbstractBindingLifecycle.java:73)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.cloud.stream.binding.InputBindingLifecycle.stop(InputBindingLifecycle.java:34)
~[spring-cloud-stream-2.1.2.RELEASE.jar:2.1.2.RELEASE] at
org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:238)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:53)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:377)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:210)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:128)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1018)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] at
org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:945)
[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE] ```

Solution was to use version 0.2.1.RELEASE for the RocketMQ binder:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
<version>0.2.1.RELEASE</version>
</dependency>

Related

"Unable to load config data from 'aws-parameterstore:'"

I'm seeing exception below after creating a sample Spring-boot application with io.awspring.cloud plug-in:
java.lang.IllegalStateException: Unable to load config data from 'aws-parameterstore:'
at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferences(StandardConfigDataLocationResolver.java:141)
at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferences(StandardConfigDataLocationResolver.java:126)
...
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)
at com.amazonaws.asap.MyApp.main(MyApp.java:15)
Caused by: java.lang.IllegalStateException: File extension is not known to any PropertySourceLoader. If the location is meant to reference a directory, it must end in '/' or File.separator
at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferencesForFile(StandardConfigDataLocationResolver.java:229)
at org.springframework.boot.context.config.StandardConfigDataLocationResolver.getReferences(StandardConfigDataLocationResolver.java:138)
... 31 common frames omitted
I'm assuming I haven't included the right dependency that adds code to register "aws-parameterstore" with Spring as a valid config importer.
My Pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/>
</parent>
<groupId>com.mycompany</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<name>myproject</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.version>11</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-dependencies</artifactId>
<version>2.3.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-messaging</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
My application.properties:
spring.application.name=MyApp
spring.config.import=aws-parameterstore:
From what I can read at https://docs.awspring.io/spring-cloud-aws/docs/current/reference/html/index.html#integrating-your-spring-cloud-application-with-the-aws-parameter-store I'm using the latest versions of Spring Boot and AWS, so I don't need to depend on any starters to get this behavior.
I did add spring-cloud-aws-messaging since I'll eventually be listening to an SQS queue soon.
Thanks.

Unable to create a simple spring Boot Gateway api

I am trying to create a simple spring boot Gateway project. Below is the POM.xml for the same. When the dependencies are loaded it shows it has an error. On verification, I found the gateway jar is not getting loaded. I tried to update the maven project and even refresh but nothing is working.
Error: Could not find or load main class photoappGateway.GatewayApplication Caused by: java.lang.ClassNotFoundException: photoappGateway.GatewayApplication
Can you help me to understand what I am doing wrong or where I am making mistake?
Also I am able to create a simple app with web,eureka client dependency. That one works fine.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>photo-app-Gateway</groupId>
<artifactId>Gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Gateway</name>
<description>Users Microservice</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>2020.0.1</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

Can't enable actuator into spring cloud gateway Greenwich

I just installed a Spring Cloud Gateway server (Greenwich.SR2) with Boot Actuator starter dependency, but can't reach any /actuator/gateway or /gateway API
I tried to activate and publish the endpoint, without success :
management.endpoint.gateway.enabled=true
management.endpoints.web.exposure.include=health,gateway
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>gateway</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I acknowledge that this is a WebFlux+Netty server, but this is not supposed to make any difference from what I read. I must have missed something, though.
Any experience to share, someone?
Ok, here goes the shame moment...
There is no API at /actuator/gateway; the API is at /actuator/gateway/routes and so on!

Spring Boot 1.5.9 and embedded jetty server throwing a null pointer exception at runtime?

I'm updating our springboot app to 1.5.9 and I'm encountering the following runtime (nullpointer) exception with embedded the jetty server:
Caused by: java.lang.NullPointerException
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:207) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139) ~[jetty-servlet-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.eclipse.jetty.sNullPointerExceptionervlet.ServletHandler.initialize(ServletHandler.java:741) ~[jetty-servlet-9.4.7.v20170914.jar:9.4.7.v20170914]
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext$JettyEmbeddedServletHandler.deferredInitialize(JettyEmbeddedWebAppContext.java:46) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext.deferredInitialize(JettyEmbeddedWebAppContext.java:36) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.handleDeferredInitialize(JettyEmbeddedServletContainer.java:205) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.handleDeferredInitialize(JettyEmbeddedServletContainer.java:211) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
at org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:138) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
It worked fine with spring boot 1.4.0, so the issue is definitely related to upgrading to 1.5.9?
I have the following in the pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.9.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<version>1.5.9.RELEASE</version>
</dependency>
Thanks
This is working fine for me , can you delete your cache(.m2 folder) try to build the project again might be cache issue
this is my POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stackflow.test</groupId>
<artifactId>DemoSpring1.5.9</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>DemoSpring1.5.9</name>
<description>Stackflow project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

NoUniqueBeanDefinitionException thrown when starting Spring Cloud Config Server in STS

I have a Spring Cloud Config Server, Boot application with the below pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>scc-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>scc-server</name>
<description>Spring Cloud (Centralized) Config. Server</description>
<parent>
<groupId>my.company</groupId>
<artifactId>company_parent</artifactId>
<version>1.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Brixton.RELEASE</spring-cloud.version>
<org.springframework.boot.version>1.3.6.RELEASE</org.springframework.boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-monitor</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${org.springframework.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
When I start this in STS (version 3.8.4.RELEASE), in the console, I see the following exception:
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jmx.export.MBeanExporter] is defined: more than one 'primary' bean found among candidates: [mbeanExporter, integrationMbeanExporter, endpointMBeanExporter]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.determinePrimaryCandidate(DefaultListableBeanFactory.java:1255) ~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.determineAutowireCandidate(DefaultListableBeanFactory.java:1216) ~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1124) ~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
... 19 common frames omitted
When I run the same project via the command line (mvn spring-boot:run), it starts & runs fine.
No exceptions are thrown when running:
<spring-cloud.version>Brixton.SR7</spring-cloud.version>
<org.springframework.boot.version>1.3.8.RELEASE</org.springframework.boot.version>
We are using Spring Boot version 1.3.6.RELEASE so cannot change that. Any help is greatly appreciated.

Resources