Issue
I am getting the above error. After googling a bit, I came to know that the problem is with the dependencies. So I ran mvn dependency:tree command and got the following output -
INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dubbo-test --- [INFO] com.privacera.dubbo:dubbo-test:jar:1.0-SNAPSHOT [INFO] +- com.alibaba.boot:dubbo-spring-boot-starter:jar:1.0.0-SNAPSHOT:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.3.0.RELEASE:true [INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.0.RELEASE:runtime [INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.3:runtime [INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.3:runtime [INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.13:runtime [INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.13:runtime [INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.13:runtime [INFO] | | +- org.springframework:spring-core:jar:4.2.3.RELEASE:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.16:runtime [INFO] | +- com.alibaba:dubbo:jar:2.5.9:compile [INFO] | | +- org.springframework:spring-context:jar:4.3.10.RELEASE:compile [INFO] | | | +- org.springframework:spring-aop:jar:4.3.10.RELEASE:compile [INFO] | | | \- org.springframework:spring-expression:jar:4.3.10.RELEASE:compile [INFO] | | +- org.springframework:spring-beans:jar:4.3.10.RELEASE:compile [INFO] | | +- org.springframework:spring-web:jar:4.3.10.RELEASE:compile [INFO] | | +- org.javassist:javassist:jar:3.20.0-GA:compile [INFO] | | \- org.jboss.netty:netty:jar:3.2.5.Final:compile [INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.9:compile [INFO] | | +- org.slf4j:slf4j-api:jar:1.6.1:compile [INFO] | | +- log4j:log4j:jar:1.2.16:compile [INFO] | | +- jline:jline:jar:0.9.94:compile [INFO] | | \- io.netty:netty:jar:3.10.5.Final:compile [INFO] | +- org.apache.curator:curator-framework:jar:2.12.0:compile [INFO] | | \- org.apache.curator:curator-client:jar:2.12.0:compile [INFO] | | \- com.google.guava:guava:jar:16.0.1:compile [INFO] | +- com.alibaba.boot:dubbo-spring-boot-autoconfigure:jar:1.0.0-SNAPSHOT:compile [INFO] | \- com.alibaba.boot:dubbo-spring-boot-actuator:jar:1.0.0-SNAPSHOT:compile [INFO] \- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.3.RELEASE:compile [INFO] \- org.springframework.boot:spring-boot:jar:1.3.3.RELEASE:compile
But I am unable to understand which dependency is conflicting. Following is the content of 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>
<groupId>com.vector.dubbo</groupId>
<artifactId>dubbo-test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.3.3.RELEASE</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
Solution
What I can see is that there are 2 spring boot versions 1.3.3 and 1.3.0(coming from alibaba starter). Exclude any one of them and try again. Hope this solves your issue.
Answered By - rishi