Service don't start after upgrading to Spring boot 1.4 - spring

I just upgraded all my spring boot services from 1.3.6.RELEASE to 1.4.0.RELEASE. Now all of them crash at startup with a :
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/ObjectProvider
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[na:1.8.0_91]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[na:1.8.0_91]
at java.lang.Class.getDeclaredConstructors(Class.java:2020) ~[na:1.8.0_91]
at org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:566) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
Here is one of my service dependency tree:
[INFO] com.onedesk:history-service:jar:0.0.1-SNAPSHOT
[INFO] +- com.onedesk.shared:dto:jar:1.0-SNAPSHOT:compile
[INFO] | \- com.onedesk.shared:core:jar:1.0-SNAPSHOT:compile
[INFO] +- com.onedesk.shared:endpoints:jar:1.0-SNAPSHOT:compile
[INFO] | +- (com.onedesk.shared:dto:jar:1.0-SNAPSHOT:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-context:jar:4.2.6.RELEASE:compile (version managed from 4.2.7.RELEASE)
[INFO] | | +- org.springframework:spring-aop:jar:4.2.6.RELEASE:compile
[INFO] | | | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework:spring-beans:jar:4.2.6.RELEASE:compile
[INFO] | | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | | \- org.springframework:spring-expression:jar:4.2.6.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | +- org.springframework:spring-web:jar:4.2.6.RELEASE:compile (version managed from 4.2.7.RELEASE)
[INFO] | | +- (org.springframework:spring-aop:jar:4.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.2.7.RELEASE; omitted for duplicate)
[INFO] | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | \- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.4.0.RELEASE: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-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.3.2.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile
[INFO] | | | \- (org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[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:slf4j-api:jar:1.7.21:compile - version managed from 1.6.6; omitted for duplicate)
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] | | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate)
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] | | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate)
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | \- org.springframework.boot:spring-boot-actuator:jar:1.4.0.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | \- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.3.2.RELEASE; omitted for duplicate)
[INFO] +- org.projectlombok:lombok:jar:1.16.10:compile
[INFO] +- org.springframework.boot:spring-boot-starter-remote-shell:jar:1.4.0.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework.boot:spring-boot-starter-actuator:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.crashub:crash.cli:jar:1.3.2:compile
[INFO] | +- org.crashub:crash.connectors.ssh:jar:1.3.2:compile
[INFO] | | +- (org.crashub:crash.shell:jar:1.3.2:compile - omitted for duplicate)
[INFO] | | +- org.apache.sshd:sshd-core:jar:0.11.0:compile
[INFO] | | | \- (org.apache.mina:mina-core:jar:2.0.7:compile - omitted for duplicate)
[INFO] | | +- org.apache.sshd:sshd-pam:jar:0.11.0:compile
[INFO] | | | +- (org.apache.sshd:sshd-core:jar:0.11.0:compile - omitted for duplicate)
[INFO] | | | \- net.sf.jpam:jpam:jar:1.1:compile
[INFO] | | +- org.bouncycastle:bcprov-jdk15on:jar:1.51:compile
[INFO] | | +- org.bouncycastle:bcpkix-jdk15on:jar:1.51:compile
[INFO] | | | \- (org.bouncycastle:bcprov-jdk15on:jar:1.51:compile - omitted for duplicate)
[INFO] | | \- org.apache.mina:mina-core:jar:2.0.7:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] | +- org.crashub:crash.embed.spring:jar:1.3.2:compile
[INFO] | | +- (org.crashub:crash.shell:jar:1.3.2:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 3.1.1.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 3.1.1.RELEASE; omitted for duplicate)
[INFO] | | \- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 3.1.1.RELEASE; omitted for duplicate)
[INFO] | +- org.crashub:crash.plugins.cron:jar:1.3.2:compile
[INFO] | | +- (org.crashub:crash.shell:jar:1.3.2:compile - omitted for duplicate)
[INFO] | | \- it.sauronsoftware.cron4j:cron4j:jar:2.2.5:compile
[INFO] | +- org.crashub:crash.plugins.mail:jar:1.3.2:compile
[INFO] | | \- (org.crashub:crash.shell:jar:1.3.2:compile - omitted for duplicate)
[INFO] | +- org.crashub:crash.shell:jar:1.3.2:compile
[INFO] | | \- (org.crashub:crash.cli:jar:1.3.2:compile - omitted for duplicate)
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.7:compile
[INFO] | \- com.sun.mail:javax.mail:jar:1.5.5:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.0.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile - omitted for duplicate)
[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] | | \- (org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.4:compile - omitted for duplicate)
[INFO] | +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile (version managed from 3.2.1.Final)
[INFO] | | \- com.fasterxml:classmate:jar:1.3.1:compile (version managed from 1.1.0)
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile (version managed from 2.8.0)
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile
[INFO] | +- (org.springframework:spring-web:jar:4.2.6.RELEASE:compile - version managed from 4.3.2.RELEASE; omitted for duplicate)
[INFO] | \- org.springframework:spring-webmvc:jar:4.2.6.RELEASE:compile (version managed from 4.3.2.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 3.1.1.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 3.1.1.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-expression:jar:4.2.6.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:4.2.6.RELEASE:compile - version managed from 4.3.2.RELEASE; omitted for duplicate)
[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:jar:1.4.0.RELEASE:test - omitted for duplicate)
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.0.RELEASE:test
[INFO] | | +- (org.springframework.boot:spring-boot-test:jar:1.4.0.RELEASE:test - omitted for duplicate)
[INFO] | | \- (org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:test - omitted for duplicate)
[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 - omitted for conflict with 5.0.4)
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.16; scope updated from test; omitted for duplicate)
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | | \- (org.hamcrest:hamcrest-core:jar:1.3:test - version managed from 1.1; omitted for duplicate)
[INFO] | +- org.assertj:assertj-core:jar:2.5.0:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | +- (org.hamcrest:hamcrest-core:jar:1.3:test - version managed from 1.1; omitted for duplicate)
[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.hamcrest:hamcrest-core:jar:1.3:test - version managed from 1.1; omitted for duplicate)
[INFO] | +- org.skyscreamer:jsonassert:jar:1.3.0:test
[INFO] | | \- (org.json:json:jar:20140107:test - version managed from 20090211; omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.2.6.RELEASE; scope updated from test; omitted for duplicate)
[INFO] | \- org.springframework:spring-test:jar:4.2.6.RELEASE:test (version managed from 4.3.2.RELEASE)
[INFO] | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:test - version managed from 4.2.6.RELEASE; omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:1.4.0.RELEASE:compile
[INFO] | +- org.json:json:jar:20140107:compile
[INFO] | \- org.springframework:spring-core:jar:4.3.2.RELEASE:compile
[INFO] \- org.springframework.cloud:spring-cloud-starter-eureka:jar:1.1.0.RELEASE:compile
[INFO] +- (org.springframework.boot:spring-boot-starter-web:jar:1.4.0.RELEASE:compile - version managed from 1.3.5.RELEASE; omitted for duplicate)
[INFO] +- org.springframework.cloud:spring-cloud-starter:jar:1.1.0.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile - version managed from 1.3.4.RELEASE; omitted for duplicate)
[INFO] | +- org.springframework.cloud:spring-cloud-context:jar:1.1.0.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:4.0.4.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:1.1.0.RELEASE:compile
[INFO] | | \- (org.springframework.security:spring-security-crypto:jar:4.0.4.RELEASE:compile - omitted for duplicate)
[INFO] | \- org.springframework.security:spring-security-rsa:jar:1.0.1.RELEASE:compile
[INFO] | +- (org.springframework.security:spring-security-crypto:jar:4.0.4.RELEASE:compile - version managed from 3.2.7.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - version managed from 4.1.6.RELEASE; omitted for duplicate)
[INFO] | \- (org.bouncycastle:bcpkix-jdk15on:jar:1.47:compile - omitted for conflict with 1.51)
[INFO] +- org.springframework.cloud:spring-cloud-netflix-core:jar:1.1.0.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile - version managed from 1.3.5.RELEASE; omitted for duplicate)
[INFO] | \- (org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile - version managed from 1.3.5.RELEASE; omitted for duplicate)
[INFO] +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:1.1.0.RELEASE:compile
[INFO] | \- (org.springframework.cloud:spring-cloud-netflix-core:jar:1.1.0.RELEASE:compile - omitted for duplicate)
[INFO] +- com.netflix.eureka:eureka-client:jar:1.4.6:compile
[INFO] | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | \- stax:stax-api:jar:1.0.1:runtime
[INFO] | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.21:runtime - version managed from 1.6.4; omitted for duplicate)
[INFO] | | +- (com.netflix.servo:servo-core:jar:0.10.1:runtime - version managed from 0.5.3; omitted for duplicate)
[INFO] | | \- (com.netflix.archaius:archaius-core:jar:0.7.4:runtime - version managed from 0.7.3; omitted for duplicate)
[INFO] | +- (com.thoughtworks.xstream:xstream:jar:1.4.2:runtime - omitted for duplicate)
[INFO] | +- (com.netflix.archaius:archaius-core:jar:0.7.4:compile - version managed from 0.7.3; scope updated from runtime; omitted for duplicate)
[INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | +- com.netflix.servo:servo-core:jar:0.10.1:runtime
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.21:runtime - version managed from 1.7.12; omitted for duplicate)
[INFO] | | +- (com.google.guava:guava:jar:18.0:runtime - version managed from 16.0.1; omitted for duplicate)
[INFO] | | \- com.netflix.servo:servo-internal:jar:0.10.1:runtime
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.21:runtime - version managed from 1.7.12; omitted for duplicate)
[INFO] | | \- (com.google.guava:guava:jar:18.0:runtime - version managed from 16.0.1; omitted for duplicate)
[INFO] | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime (version managed from 1.19)
[INFO] | | \- (javax.ws.rs:jsr311-api:jar:1.1.1:runtime - omitted for duplicate)
[INFO] | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime (version managed from 1.19)
[INFO] | | \- (com.sun.jersey:jersey-core:jar:1.19.1:runtime - version managed from 1.19; omitted for duplicate)
[INFO] | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime (version managed from 1.19)
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.5.2:runtime - version managed from 4.3.4; omitted for duplicate)
[INFO] | | \- (com.sun.jersey:jersey-client:jar:1.19.1:runtime - version managed from 1.19; omitted for duplicate)
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.2:runtime
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.5:runtime (version managed from 4.4.4)
[INFO] | | \- commons-codec:commons-codec:jar:1.10:runtime (version managed from 1.9)
[INFO] | +- com.google.inject:guice:jar:4.0:runtime
[INFO] | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | +- (aopalliance:aopalliance:jar:1.0:runtime - omitted for duplicate)
[INFO] | | \- (com.google.guava:guava:jar:18.0:runtime - version managed from 16.0.1; omitted for duplicate)
[INFO] | +- com.netflix.governator:governator-api:jar:1.12.10:runtime
[INFO] | | \- (javax.inject:javax.inject:jar:1:runtime - omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:runtime - version managed from 2.5.4; omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-core:jar:2.8.1:runtime - version managed from 2.5.4; omitted for duplicate)
[INFO] | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:runtime - version managed from 2.5.4; omitted for duplicate)
[INFO] +- com.netflix.eureka:eureka-core:jar:1.4.6:compile
[INFO] | +- (com.netflix.eureka:eureka-client:jar:1.4.6:runtime - omitted for duplicate)
[INFO] | +- com.amazonaws:aws-java-sdk-core:jar:1.10.30:runtime (version managed from 1.9.3)
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.5.2:runtime - version managed from 4.3.6; omitted for duplicate)
[INFO] | | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:runtime - version managed from 2.5.3; omitted for duplicate)
[INFO] | +- com.amazonaws:aws-java-sdk-ec2:jar:1.10.30:runtime (version managed from 1.9.3)
[INFO] | | \- (com.amazonaws:aws-java-sdk-core:jar:1.10.30:runtime - version managed from 1.9.3; omitted for duplicate)
[INFO] | +- com.amazonaws:aws-java-sdk-autoscaling:jar:1.9.3:runtime
[INFO] | | \- (com.amazonaws:aws-java-sdk-core:jar:1.10.30:runtime - version managed from 1.9.3; omitted for duplicate)
[INFO] | +- com.amazonaws:aws-java-sdk-sts:jar:1.9.3:runtime
[INFO] | | \- (com.amazonaws:aws-java-sdk-core:jar:1.10.30:runtime - version managed from 1.9.3; omitted for duplicate)
[INFO] | +- com.amazonaws:aws-java-sdk-route53:jar:1.9.3:runtime
[INFO] | | \- (com.amazonaws:aws-java-sdk-core:jar:1.10.30:runtime - version managed from 1.9.3; omitted for duplicate)
[INFO] | +- com.netflix.governator:governator:jar:1.12.10:runtime
[INFO] | | +- (com.netflix.governator:governator-api:jar:1.12.10:runtime - omitted for duplicate)
[INFO] | | +- com.netflix.governator:governator-core:jar:1.12.10:runtime
[INFO] | | | +- (com.netflix.governator:governator-api:jar:1.12.10:runtime - omitted for duplicate)
[INFO] | | | +- (javax.inject:javax.inject:jar:1:runtime - omitted for duplicate)
[INFO] | | | +- (org.slf4j:slf4j-api:jar:1.7.21:runtime - version managed from 1.6.3; omitted for duplicate)
[INFO] | | | \- (com.google.inject:guice:jar:4.0:runtime - omitted for duplicate)
[INFO] | | +- org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:runtime - version managed from 2.4.3; omitted for duplicate)
[INFO] | +- (com.thoughtworks.xstream:xstream:jar:1.4.2:runtime - omitted for duplicate)
[INFO] | +- (javax.ws.rs:jsr311-api:jar:1.1.1:runtime - omitted for duplicate)
[INFO] | \- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:runtime
[INFO] | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:runtime
[INFO] +- org.springframework.cloud:spring-cloud-starter-archaius:jar:1.1.0.RELEASE:compile
[INFO] | +- (org.springframework.cloud:spring-cloud-starter:jar:1.1.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework.cloud:spring-cloud-netflix-core:jar:1.1.0.RELEASE:compile - omitted for duplicate)
[INFO] | +- com.netflix.archaius:archaius-core:jar:0.7.4:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.1:runtime
[INFO] | | +- (commons-configuration:commons-configuration:jar:1.8:runtime - omitted for duplicate)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.21:runtime - version managed from 1.6.4; omitted for duplicate)
[INFO] | | +- (com.google.guava:guava:jar:18.0:runtime - version managed from 16.0; omitted for duplicate)
[INFO] | | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:runtime - version managed from 2.4.3; omitted for duplicate)
[INFO] | | +- (com.fasterxml.jackson.core:jackson-core:jar:2.8.1:runtime - version managed from 2.4.3; omitted for duplicate)
[INFO] | | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:runtime - version managed from 2.4.3; omitted for duplicate)
[INFO] | +- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile - version managed from 2.6.6; omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile - version managed from 2.6.6; omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:compile - version managed from 2.6.6; omitted for duplicate)
[INFO] | \- com.google.guava:guava:jar:18.0:compile
It seems that there is a spring version issue there but I have not idea where it comes from. Here is 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.onedesk</groupId>
<artifactId>history-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>history-service</name>
<description>history service</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>dto</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>endpoints</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-remote-shell</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</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-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.RELEASE</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>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>

So the issue was in dependencyManagement:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
I just needed to replace to:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId> <!--changed-->
<version>Brixton.SR4</version> <!--changed-->
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

You need to setup a dependencyManagement section in your pom.xml with Spring Boot's BOM dependency. Check it out here. But basically you need to add this:
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.4.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
After that drop the version in all your spring-related dependencies and the versions will be managed by the above dependency.
--- Edit ---
Based on your comments try modifying your dependencies:
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>dto</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>endpoints</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
to this:
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>dto</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.onedesk.shared</groupId>
<artifactId>endpoints</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

I assume this is the villain:
[INFO] +- com.onedesk.shared:endpoints:jar:1.0-SNAPSHOT:compile
[INFO] | +- (com.onedesk.shared:dto:jar:1.0-SNAPSHOT:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-context:jar:4.2.6.RELEASE:compile (version managed from 4.2.7.RELEASE)
[INFO] | | +- org.springframework:spring- aop:jar:4.2.6.RELEASE:compile
[INFO] | | | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile
At the end of the dependency chain is Spring Beans with version 4.2.6.
The ObjectProvider, which class isn't found, is available since version 4.3, as you can see in the API:
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/ObjectProvider.html
You should upgrade the dependency from this artifact com.onedesk.shared:endpoints:jar to spring-context with version 4.3

Even after implementing the accepted solution, I was still having this problem. It turned out the camel dependency manager also needed to be upgraded:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
<version>2.18.0</version> <--- was 2.17.2
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Related

Unable to run spring boot tests using maven: No tests were executed

I am unable to run tests for a spring boot app using maven. I have seen multiple posts about this, most of their solutions are to:
align a junit version with maven-surefire-plugin or
ensure a junit version is not predefined by a parent element
My project does not use a parent nor maven-surefire-plugin. Otherwise, based on the pom file, I don't see any glaring conflicts. I do see the junit:jar:4.13.2, but that is part of the junit-vintage dependency for backwards compatability.
What could be causing this?
Spring-Boot: (v2.4.3)
Camunda Platform: (v7.15.0)
Camunda Platform Spring Boot Starter: (v7.15.0)
Apache Maven 3.6.3
Java version: 11.0.8, vendor: Azul Systems, Inc., runtime: C:\Program Files (x86)\Zulu\zulu-11
OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"
pom
<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.myapp</groupId>
<artifactId>myappdemo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.4.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>7.15.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
<artifactId>camunda-spin-dataformat-all</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>21.4.0.0.1</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ucp11</artifactId>
<version>21.4.0.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>3.2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.24</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<layout>ZIP</layout>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
mvn dependency:tree
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:jar:7.15.0:compile
[INFO] | +- org.camunda.bpm:camunda-engine-spring:jar:7.15.0:compile
[INFO] | | +- org.camunda.bpm:camunda-engine:jar:7.15.0:compile
[INFO] | | | +- org.camunda.bpm.model:camunda-bpmn-model:jar:7.15.0:compile
[INFO] | | | | \- org.camunda.bpm.model:camunda-xml-model:jar:7.15.0:compile
[INFO] | | | +- org.camunda.bpm.model:camunda-cmmn-model:jar:7.15.0:compile
[INFO] | | | +- org.camunda.bpm.dmn:camunda-engine-dmn:jar:7.15.0:compile
[INFO] | | | | +- org.camunda.bpm.model:camunda-dmn-model:jar:7.15.0:compile
[INFO] | | | | +- org.camunda.bpm.dmn:camunda-engine-feel-api:jar:7.15.0:compile
[INFO] | | | | +- org.camunda.bpm.dmn:camunda-engine-feel-juel:jar:7.15.0:compile
[INFO] | | | | +- org.camunda.bpm.dmn:camunda-engine-feel-scala:jar:7.15.0:compile
[INFO] | | | | \- org.camunda.feel:feel-engine:jar:scala-shaded:1.13.1:compile
[INFO] | | | +- org.camunda.commons:camunda-commons-typed-values:jar:7.15.0:compile
[INFO] | | | +- org.mybatis:mybatis:jar:3.5.6:compile
[INFO] | | | +- joda-time:joda-time:jar:2.1:compile
[INFO] | | | +- org.camunda.connect:camunda-connect-core:jar:1.5.2:compile
[INFO] | | | \- org.camunda.connect:camunda-connect-connectors-all:jar:1.5.2:runtime
[INFO] | | \- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] | | \- commons-pool:commons-pool:jar:1.6:compile
[INFO] | +- org.springframework:spring-context:jar:5.3.4:compile
[INFO] | | +- org.springframework:spring-beans:jar:5.3.4:compile
[INFO] | | +- org.springframework:spring-core:jar:5.3.4:compile
[INFO] | | | \- org.springframework:spring-jcl:jar:5.3.4:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.3.4:compile
[INFO] | +- org.springframework:spring-jdbc:jar:5.3.4:compile
[INFO] | +- org.springframework:spring-tx:jar:5.3.4:compile
[INFO] | +- org.springframework:spring-orm:jar:5.3.4:compile
[INFO] | +- org.springframework.boot:spring-boot-loader-tools:jar:2.4.3:compile
[INFO] | | \- org.apache.commons:commons-compress:jar:1.20:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.3:compile
[INFO] | | \- org.springframework.boot:spring-boot:jar:2.4.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.4.3:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.3: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.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.11:compile
[INFO] | \- com.fasterxml.uuid:java-uuid-generator:jar:3.2.0:compile
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:jar:7.15.0:compile
[INFO] | +- org.camunda.bpm:camunda-engine-rest-jaxrs2:jar:7.15.0:compile
[INFO] | | +- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] | | +- commons-io:commons-io:jar:2.8.0:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.11.4:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.11.4:compile
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.11.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.4:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.11.4:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-jersey:jar:2.4.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.4.3:compile
[INFO] | | \- org.hibernate.validator:hibernate-validator:jar:6.1.7.Final:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.32:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.32:compile
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.32:compile
[INFO] | | +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[INFO] | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.32:compile
[INFO] | | +- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[INFO] | | \- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.32:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.32:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.32:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-spring5:jar:2.32:compile
[INFO] | | +- org.glassfish.jersey.inject:jersey-hk2:jar:2.32:compile
[INFO] | | | \- org.glassfish.hk2:hk2-locator:jar:2.6.1:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1:compile
[INFO] | | +- org.glassfish.hk2:hk2:jar:2.6.1:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.6.1:compile
[INFO] | | | +- org.glassfish.hk2:hk2-api:jar:2.6.1:compile
[INFO] | | | +- org.glassfish.hk2:hk2-core:jar:2.6.1:compile
[INFO] | | | +- org.glassfish.hk2:hk2-runlevel:jar:2.6.1:compile
[INFO] | | | \- org.glassfish.hk2:class-model:jar:2.6.1:compile
[INFO] | | | +- org.ow2.asm:asm:jar:7.1:compile
[INFO] | | | +- org.ow2.asm:asm-analysis:jar:7.1:compile
[INFO] | | | +- org.ow2.asm:asm-commons:jar:7.1:compile
[INFO] | | | +- org.ow2.asm:asm-tree:jar:7.1:compile
[INFO] | | | \- org.ow2.asm:asm-util:jar:7.1:compile
[INFO] | | \- org.glassfish.hk2:spring-bridge:jar:2.6.1:compile
[INFO] | \- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.32:compile
[INFO] | \- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.32:compile
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:jar:7.15.0:compile
[INFO] | +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-core:jar:7.15.0:compile
[INFO] | | \- org.camunda.bpm.webapp:camunda-webapp:jar:classes:7.15.0:compile
[INFO] | \- org.camunda.bpm.webapp:camunda-webapp-webjar:jar:7.15.0:compile
[INFO] +- org.camunda.bpm:camunda-engine-plugin-spin:jar:7.15.0:compile
[INFO] | \- org.camunda.spin:camunda-spin-core:jar:1.10.1:compile
[INFO] +- org.camunda.spin:camunda-spin-dataformat-all:jar:1.10.1:compile
[INFO] | +- org.camunda.commons:camunda-commons-logging:jar:1.10.0:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | \- org.camunda.commons:camunda-commons-utils:jar:1.10.0:compile
[INFO] +- org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-test:jar:7.15.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-test:jar:2.4.3:compile
[INFO] | | +- org.springframework.boot:spring-boot-test:jar:2.4.3:compile
[INFO] | | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.3:compile
[INFO] | | +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] | | | \- net.minidev:json-smart:jar:2.3:compile
[INFO] | | | \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] | | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] | | +- org.assertj:assertj-core:jar:3.18.1:compile
[INFO] | | +- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] | | +- org.skyscreamer:jsonassert:jar:1.5.0:compile
[INFO] | | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] | | +- org.springframework:spring-test:jar:5.3.4:compile
[INFO] | | \- org.xmlunit:xmlunit-core:jar:2.7.0:compile
[INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.7.1:compile
[INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] | | +- org.junit.platform:junit-platform-engine:jar:1.7.1:compile
[INFO] | | \- junit:junit:jar:4.13.2:compile
[INFO] | \- org.camunda.bpm.assert:camunda-bpm-assert-assertj3-11-1:jar:4.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.4.3:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.4:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.4.5:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.4.5:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.4.5:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.4.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.4.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.4.3:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.43:compile
[INFO] | | +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.43:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.4:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.4:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.23:runtime
[INFO] +- com.h2database:h2:jar:1.4.200:compile
[INFO] +- com.oracle.database.jdbc:ojdbc11:jar:21.4.0.0.1:compile
[INFO] +- com.oracle.database.jdbc:ucp11:jar:21.4.0.0.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.4.3:compile
[INFO] | \- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.4.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.4.3:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.4.28.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.27.0-GA:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.20:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.2.3.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.3:compile
[INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.3:compile
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:3.0.11:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.4.5:compile
[INFO] | | \- org.springframework.data:spring-data-commons:jar:2.4.5:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.3.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.4.3:compile
[INFO] | +- org.springframework:spring-context-support:jar:5.3.4:compile
[INFO] | \- com.sun.mail:jakarta.mail:jar:1.6.5:compile
[INFO] | \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.6.0:test
[INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.1:test
[INFO] | | +- org.opentest4j:opentest4j:jar:1.2.0:compile
[INFO] | | \- org.junit.platform:junit-platform-commons:jar:1.7.1:compile
[INFO] | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.1:test
[INFO] | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.1:test
[INFO] +- org.mockito:mockito-junit-jupiter:jar:3.2.4:test
[INFO] | \- org.mockito:mockito-core:jar:3.6.28:compile
[INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.10.20:compile
[INFO] | \- org.objenesis:objenesis:jar:3.1:compile
[INFO] \- org.apache.pdfbox:pdfbox:jar:2.0.24:compile
[INFO] +- org.apache.pdfbox:fontbox:jar:2.0.24:compile
[INFO] \- commons-logging:commons-logging:jar:1.2:compile
[INFO] ------------------------------------------------------------------------
First upgrade your Spring Boot version (because a bit out of date or more accurate out of support) and second upgrade your Maven version (also out dated) ...also define the junit-bom to define the correct junit jupiter version like this:
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
This has to be done before the import of the spring boot dependencies to overwrite correctly the version which is provided by spring-boot-dependencies.
Also you are not using spring boot as a parent which means you have to define all needed maven plugins. Based on that you are using the default bindings which are defined via the packaging binding.
I strongly recommend to define all needed plugins in your plugin with the appropriate versions which makes it sure to use defined versions of plugins which will never change in the future. This makes your build repeatable.
The first versions which correctly support JUnit Jupiter is maven-surefire-plugin (2.22.2) ... I strongly recommend to use the most recent version.
More details explained in two videos one and the second one
My project does not use a parent nor maven-surefire-plugin
How are you going to run junit test without maven-surefire-plugin? :)
Actually, maven has a concept of default bindings when for particular packaging it predefines plugins and versions. In case of Apache Maven 3.6.3 the default version of maven-surefire-plugin is 2.12, basic support of junit-jupiter was introduced in 2.22 - you either need to setup maven-surefire-plugin or switch to recent version of maven.

Maven dependency:tree doesn't show all transitive dependencies

I was trying to parse some dependency trees via maven dependency:tree, and found some interesting cases:
I made a pom.xml to install org.glassfish.jersey.containers:jersey-container-servlet:2.19, here is the content:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId> fake_id </groupId>
<artifactId> fake_id </artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.19</version>
</dependency>
</dependencies>
</project>
Before installing this package, I removed all folders in /home/${user}/.m2/repository in case the result to be affected by existing environment.
Then I ran mvn dependency:tree -Dverbose, I got the following dependency tree:
fake_id:fake_id:jar:1.0.0
[INFO] \- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.19:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.19:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile
[INFO] | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.jersey.core:jersey-server:jar:2.19:compile - omitted for duplicate)
[INFO] | \- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] +- org.glassfish.jersey.core:jersey-common:jar:2.19:compile
[INFO] | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.19:compile
[INFO] | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile
[INFO] | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b25:compile
[INFO] | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25:compile
[INFO] | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-utils:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.19:compile
[INFO] | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.19:compile
[INFO] | | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.19:compile
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- (org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile - omitted for duplicate)
[INFO] | +- (javax.annotation:javax.annotation-api:jar:1.2:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
However, both org.glassfish.hk2:hk2-api:2.4.0-b25 and org.glassfish.hk2:hk2-utils:2.4.0-b25 have a direct dependency on javax.inject:javex.inject, but javax.inject:javex.injectdidn't show in the output dependency tree. Dependency section in the two pom.xml looks like:
...
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
...
To validate whether javax.inject:javax.inject was an real dependency in the tree, I removed the /home/${user}/.m2/javax/inject folder in case , and ran mvn dependency:tree -Dverbose again, and I found it indeed has downloaded javax.inject:javax.inject:1 again, here is the log.
[INFO] Building fake_id 1.0.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom
Downloaded: https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom (612 B at 0.5 KB/sec)
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # fake_id ---
[INFO] fake_id:fake_id:jar:1.0.0
[INFO] \- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.19:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.19:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile
[INFO] | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.jersey.core:jersey-server:jar:2.19:compile - omitted for duplicate)
[INFO] | \- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] +- org.glassfish.jersey.core:jersey-common:jar:2.19:compile
[INFO] | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.19:compile
[INFO] | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile
[INFO] | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b25:compile
[INFO] | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25:compile
[INFO] | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-utils:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.19:compile
[INFO] | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.19:compile
[INFO] | | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.19:compile
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.19:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | | \- (org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile - omitted for duplicate)
[INFO] | +- (javax.annotation:javax.annotation-api:jar:1.2:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile - omitted for duplicate)
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.439 s
[INFO] Finished at: 2020-03-17T14:58:44+08:00
[INFO] Final Memory: 20M/596M
As far as I have explored, I didn't find any other constraints on javax.inject:javax.inject (such as exclusion, option, etc.).
So I what I want to ask is why javax.inject:javax.inject are ignored by mvn dependency:tree, and is this any solution that I can get this package in dependency tree?
Thanks for your time and kind reply!
To make up the result without -Dverbose:
[INFO] Building fake_id 1.0.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom
Downloaded: https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.pom (612 B at 0.5 KB/sec)
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # fake_id ---
[INFO] fake_id:fake_id:jar:1.0.0
[INFO] \- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.19:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.19:compile
[INFO] | \- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b25:compile
[INFO] +- org.glassfish.jersey.core:jersey-common:jar:2.19:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.19:compile
[INFO] | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b25:compile
[INFO] | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b25:compile
[INFO] | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b25:compile
[INFO] | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b25:compile
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.19:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.19:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.19:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
The description of the verbose option says (https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html):
Whether to include omitted nodes in the serialized dependency tree. Notice this feature actually uses Maven 2 algorithm and may give wrong results when used with Maven 3

javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType

Im trying to run a simple JPA spring web page, but i'm having trouble with getting it to recognize javax.persistence, or maybe I have conflicts of imports.
So far I have tried removing many maven dependencies to try finding a conflict as a few other stackoverflow answers involved this and I was unable to. I also tried adding the persistence api dependency but it did not help
These are my dependencies in pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</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-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
</dependencies>
and this is the error I am getting when running the program
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.<init>(PersistenceAnnotationBeanPostProcessor.java:665)
The following method did not exist:
javax.persistence.PersistenceContext.synchronization()Ljavax/persistence/SynchronizationType;
The method's class, javax.persistence.PersistenceContext, is available from the following locations:
jar:file:/C:/Users/hicks/IdeaProjects/CodeSite/lib/javax.persistence.jar!/javax/persistence/PersistenceContext.class
jar:file:/C:/Users/hicks/.m2/repository/javax/persistence/javax.persistence-api/2.2/javax.persistence-api-2.2.jar!/javax/persistence/PersistenceContext.class
It was loaded from the following location:
file:/C:/Users/hicks/IdeaProjects/CodeSite/lib/javax.persistence.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.PersistenceContext
Running maven dependency:tree -Dverbose returns this tree, which shows only one occurrence of javax.persistence-api:
[INFO] ------------------------------------------------------------------------
[INFO] Building codesite 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) # demo ---
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[INFO] jacob:demo:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.4.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.4.RELEASE:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.1.6.RELEASE:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.3.9.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] | | +- org.javassist:javassist:jar:3.23.1-GA:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.9.12:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.1.6.RELEASE:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.15:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.1.4.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.4.RELEASE: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.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.26:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.23:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.1.4.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.8:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.8:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.4.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.17:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.17:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.17:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.16.Final:compile
[INFO] | | \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.1.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.4.RELEASE: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] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.12:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6: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] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.1.6.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] +- commons-io:commons-io:jar:2.1:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.8:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[INFO] +- io.projectreactor:reactor-test:jar:3.2.8.RELEASE:test
[INFO] | \- io.projectreactor:reactor-core:jar:3.2.8.RELEASE:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:2.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.1.6.RELEASE:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.26:compile
[INFO] +- org.springframework.data:spring-data-jpa:jar:2.1.6.RELEASE:runtime
[INFO] | +- org.springframework:spring-orm:jar:5.1.6.RELEASE:runtime
[INFO] | +- org.springframework:spring-context:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:5.1.6.RELEASE:compile
[INFO] | \- org.aspectj:aspectjrt:jar:1.9.2:runtime
[INFO] +- org.springframework.session:spring-session-core:jar:2.1.5.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.1.4.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.1.4.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.1.4.RELEASE:compile
[INFO] | | \- io.projectreactor.netty:reactor-netty:jar:0.8.6.RELEASE:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.34.Final:compile
[INFO] | | | +- io.netty:netty-common:jar:4.1.34.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.34.Final:compile
[INFO] | | | +- io.netty:netty-transport:jar:4.1.34.Final:compile
[INFO] | | | | \- io.netty:netty-resolver:jar:4.1.34.Final:compile
[INFO] | | | \- io.netty:netty-codec:jar:4.1.34.Final:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.1.34.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.34.Final:compile
[INFO] | | +- io.netty:netty-handler-proxy:jar:4.1.34.Final:compile
[INFO] | | | \- io.netty:netty-codec-socks:jar:4.1.34.Final:compile
[INFO] | | \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.34.Final:compile
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.34.Final:compile
[INFO] | +- org.springframework:spring-webflux:jar:5.1.6.RELEASE:compile
[INFO] | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] +- de.codecentric:spring-boot-admin-starter-server:jar:2.1.4:compile
[INFO] | +- de.codecentric:spring-boot-admin-server:jar:2.1.4:compile
[INFO] | | \- io.projectreactor.addons:reactor-extra:jar:3.2.2.RELEASE:compile
[INFO] | +- de.codecentric:spring-boot-admin-server-ui:jar:2.1.4:compile
[INFO] | \- de.codecentric:spring-boot-admin-server-cloud:jar:2.1.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.4.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:2.1.4.RELEASE:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.1.4:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:2.1.4.RELEASE:compile
[INFO] | \- org.springframework:spring-context-support:jar:5.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.1.4.RELEASE:compile
[INFO] | \- com.sun.mail:javax.mail:jar:1.6.2:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.1.4.RELEASE:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.11.RELEASE:compile
[INFO] | | \- org.thymeleaf:thymeleaf:jar:3.0.11.RELEASE:compile
[INFO] | | +- org.attoparser:attoparser:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] | \- org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot-starter-web-services:jar:2.1.4.RELEASE:compile
[INFO] +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.0:compile
[INFO] | +- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
[INFO] | +- org.jvnet.mimepull:mimepull:jar:1.9.11:compile
[INFO] | \- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] +- javax.xml.ws:jaxws-api:jar:2.3.1:compile
[INFO] +- org.springframework:spring-oxm:jar:5.1.6.RELEASE:compile
[INFO] \- org.springframework.ws:spring-ws-core:jar:3.0.7.RELEASE:compile
[INFO] \- org.springframework.ws:spring-xml:jar:3.0.7.RELEASE:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
As I see you are having conflicts in your spring data dependency version
One is 2.1.6 another is 2.1.4
Please remove 2.1.4 version and change 2.1.6 scope to default(compile)

ElasticsearchIntegrationTest with Spring Boot

I am trying to use ElasticsearchIntegrationTest (http://www.elastic.co/guide/en/elasticsearch/reference/1.x/integration-tests.html) for my Integration tests in a Spring Boot application.
#ElasticsearchIntegrationTest.ClusterScope(scope =ElasticsearchIntegrationTest.Scope.SUITE)
public class MyElasticsearchIntegrationTests extends ElasticsearchIntegrationTest
When I run this test, I am getting following error:
java.lang.AssertionError: Version must be upgraded to [4.10.4] is still set to [4.10.3]
at org.elasticsearch.Version.<clinit>(Version.java:229)
at org.elasticsearch.test.ElasticsearchTestCase.<clinit>(ElasticsearchTestCase.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.carrotsearch.randomizedtesting.RandomizedRunner$1.run(RandomizedRunner.java:553)
My dependencies are defined like this in my pom.xml:
<dependencies>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.5.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>4.10.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>1.3.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
</dependencies>
And when I run mvn dependecy:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # demo ---
[INFO] com.sebpc:demo:jar:0.0.1-SNAPSHOT
[INFO] +- org.elasticsearch:elasticsearch:test-jar:tests:1.5.1:test
[INFO] | +- org.apache.lucene:lucene-core:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-analyzers-common:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-queries:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-memory:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-highlighter:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-queryparser:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-sandbox:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-suggest:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-misc:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-join:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-grouping:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-spatial:jar:4.10.4:compile
[INFO] | | \- com.spatial4j:spatial4j:jar:0.4.1:compile
[INFO] | +- org.antlr:antlr-runtime:jar:3.5:compile
[INFO] | +- org.ow2.asm:asm:jar:4.1:compile
[INFO] | \- org.ow2.asm:asm-commons:jar:4.1:compile
[INFO] +- org.apache.lucene:lucene-test-framework:jar:4.10.4:compile
[INFO] | +- org.apache.lucene:lucene-codecs:jar:4.10.4:compile
[INFO] | +- com.carrotsearch.randomizedtesting:junit4-ant:jar:2.1.6:compile
[INFO] | +- com.carrotsearch.randomizedtesting:randomizedtesting- runner:jar:2.1.6:compile
[INFO] | +- junit:junit:jar:4.12:compile
[INFO] | \- org.apache.ant:ant:jar:1.8.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | \- org.springframework.boot:spring-boot-starter:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.1.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.1.3:compile
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.11:compile
[INFO] | | \- org.slf4j:log4j-over-slf4j:jar:1.7.11:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.14:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.21:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.21:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.21:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.21:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | | \- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.5.1:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.5.1:compile
[INFO] | +- org.springframework:spring-web:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | \- org.springframework:spring-beans:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | \- org.springframework:spring-expression:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.3.0.BUILD-SNAPSHOT: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.springframework:spring-core:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | \- org.springframework:spring-test:jar:4.2.0.BUILD-SNAPSHOT:test
[INFO] +- org.springframework.data:spring-data-elasticsearch:jar:1.3.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-context:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-tx:jar:4.2.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.10.0.RELEASE:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- joda-time:joda-time:jar:2.7:compile
[INFO] | +- org.elasticsearch:elasticsearch:jar:1.4.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.5.1:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.11:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.11:compile
[INFO] \- com.google.guava:guava:jar:18.0:compile
It looks like all the lucene related libraries are 4.10.4, not 4.10.3, that's why I am a bit confused with this error message.
Any help would be appreciated !
Thanks
You should not define artefact dependency for elasticsearch unless you want to use specific version as it will be added automatically by spring data elasticsearch.
with latest spring data elasticsearch snapshot 1.3.0.BUILD-SNAPSHOT you will get elasticsearch 1.5.2 which is latest version anyway.
suggestion : remove elasticsearch dependency from your pom and use transient dependency coming from spring data elasticsearch.
if you still want to use particular version then exclude elasticsearch dependency from spring data elasticsearch.

Unable to start spring boot application

I am unable to start my application using #SpringBootApplication.
#SpringBootApplication
public class AppInitializer extends SpringBootServletInitializer {
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(AppInitializer.class);
}
public static void main(String[] args) {
ConfigurableApplicationContext ctx = new AppInitializer().configure(new SpringApplicationBuilder(AppInitializer.class)).run(args);
System.out.println("count="+ctx.getBeanDefinitionCount());
}
}
pom.xml uses:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
</exclusion>
</exclusions>
</dependency>
When i run the app, i get below error:
2015-03-09 09:14:10.372 INFO 10636 --- [ main]
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with
port(s): 9000 (http) 2015-03-09 09:14:10.636 INFO 10636 --- [
main] o.apache.catalina.core.StandardService : Starting service
Tomcat 2015-03-09 09:14:10.638 INFO 10636 --- [ main]
org.apache.catalina.core.StandardEngine : Starting Servlet Engine:
Apache Tomcat/7.0.57 2015-03-09 09:14:10.940 INFO 10636 ---
[ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] :
Initializing Spring embedded WebApplicationContext 2015-03-09
09:14:10.941 INFO 10636 --- [ost-startStop-1]
o.s.web.context.ContextLoader : Root WebApplicationContext:
initialization completed in 3588 ms 2015-03-09 09:14:11.936 ERROR
10636 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase :
A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at
java.util.concurrent.FutureTask.report(FutureTask.java:122) at
java.util.concurrent.FutureTask.get(FutureTask.java:188) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744) Caused by:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.addFilter(Ljava/lang/String;Ljavax/servlet/Filter;)Ljavax/servlet/FilterRegistration$Dynamic;
at
org.springframework.boot.context.embedded.FilterRegistrationBean.onStartup(FilterRegistrationBean.java:250)
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:222)
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:84)
at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:206)
at
org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 common frames omitted
Dependency Tree:
[INFO] | +- mysql:mysql-connector-java:jar:5.1.34:compile
[INFO] | +- com.zaxxer:HikariCP-java6:jar:2.2.5:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.8:compile (version managed from 1.7.5)
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:3.1.0:compile
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; omitted
for duplicate)
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:4.3.7.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[INFO] | | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] | | +- org.hibernate:hibernate-core:jar:4.3.7.Final:compile
[INFO] | | | +- (org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile - omitted for dupli
cate)
[INFO] | | | +- (org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile - om
itted for duplicate)
[INFO] | | | +- (org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.
0.Final:compile - omitted for duplicate)
[INFO] | | | +- (dom4j:dom4j:jar:1.6.1:compile - omitted for duplicate)
[INFO] | | | +- (org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compi
le - omitted for duplicate)
[INFO] | | | +- (org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:co
mpile - omitted for duplicate)
[INFO] | | | +- (org.javassist:javassist:jar:3.18.1-GA:compile - omitted for duplicate)
[INFO] | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | \- org.jboss:jandex:jar:1.1.0.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
[INFO] | | | +- (org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile - omitted for dupli
cate)
[INFO] | | | \- (org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile - om
itted for duplicate)
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compil
e
[INFO] | | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Fi
nal:compile
[INFO] | | \- (org.javassist:javassist:jar:3.18.1-GA:compile - omitted for duplicate)
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.7.1.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.9.1.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version man
aged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; omit
ted for duplicate)
[INFO] | | | \- (org.slf4j:jcl-over-slf4j:jar:1.7.8:runtime - version managed from 1.7.7;
omitted for duplicate)
[INFO] | | +- org.springframework:spring-orm:jar:4.1.4.RELEASE:compile (version managed fr
om 4.0.7.RELEASE)
[INFO] | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version man
aged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- org.springframework:spring-jdbc:jar:4.1.4.RELEASE:compile
[INFO] | | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version
managed from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version m
anaged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | | \- (org.springframework:spring-tx:jar:4.1.4.RELEASE:compile - omitted for
duplicate)
[INFO] | | | \- (org.springframework:spring-tx:jar:4.1.4.RELEASE:compile - version manage
d from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework:spring-context:jar:4.1.4.RELEASE:compile (version manage
d from 4.0.7.RELEASE)
[INFO] | | | +- (org.springframework:spring-aop:jar:4.1.4.RELEASE:compile - version manag
ed from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version man
aged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-expression:jar:4.1.4.RELEASE:compile - omitte
d for duplicate)
[INFO] | | +- org.springframework:spring-aop:jar:4.1.4.RELEASE:compile
[INFO] | | | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version man
aged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework:spring-tx:jar:4.1.4.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version man
aged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework:spring-beans:jar:4.1.4.RELEASE:compile
[INFO] | | | \- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed
from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- org.aspectj:aspectjrt:jar:1.8.4:compile (version managed from 1.8.2)
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; omitted
for duplicate)
[INFO] | | \- (org.slf4j:jcl-over-slf4j:jar:1.7.8:compile - version managed from 1.7.7; sc
ope updated from runtime; omitted for duplicate)
[INFO] | +- org.codehaus.groovy:groovy-all:jar:2.3.6:compile
[INFO] | \- log4j:log4j:jar:1.2.17:compile
[INFO] +- qcom.cas.backend.myapp:service:jar:1.0:compile
[INFO] | +- (qcom.cas.backend.myapp:persistence:jar:1.0:compile - omitted for duplicate)
[INFO] | +- (org.springframework.data:spring-data-jpa:jar:1.7.1.RELEASE:compile - omitted f
or duplicate)
[INFO] | +- (org.codehaus.groovy:groovy-all:jar:2.3.6:compile - omitted for duplicate)
[INFO] | \- (log4j:log4j:jar:1.2.17:compile - omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter-jersey:jar:1.2.1.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.2.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.2.1.RELEASE:compile
[INFO] | | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-context:jar:4.1.4.RELEASE:compile - version m
anaged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.2.1.RELEASE:compile
[INFO] | | | \- (org.springframework.boot:spring-boot:jar:1.2.1.RELEASE:compile - omitted
for duplicate)
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.2.1.RELEASE:compi
le
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.8:compile
[INFO] | | | | \- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; o
mitted for duplicate)
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.8:compile
[INFO] | | | | \- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; o
mitted for duplicate)
[INFO] | | | +- org.slf4j:log4j-over-slf4j:jar:1.7.8:compile
[INFO] | | | | \- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.7; o
mitted for duplicate)
[INFO] | | | \- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | | | +- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.8:compile - version managed from 1.7.6; o
mitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed
from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | \- org.yaml:snakeyaml:jar:1.14:runtime
[INFO] | +- (org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.1.RELEASE:compile
- omitted for duplicate)
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.4:compile (version ma
naged from 2.4.0)
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- (org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile - omitted for duplicat
e)
[INFO] | | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | +- org.springframework:spring-core:jar:4.1.4.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:4.1.4.RELEASE:compile
[INFO] | | +- (org.springframework:spring-aop:jar:4.1.4.RELEASE:compile - version managed
from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version manage
d from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-context:jar:4.1.4.RELEASE:compile - version mana
ged from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | | \- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed
from 4.0.7.RELEASE; omitted for duplicate)
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.14:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.14:compile
[INFO] | | | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | | | +- (javax.annotation:javax.annotation-api:jar:1.2:compile - omitted for dupl
icate)
[INFO] | | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.14:compile
[INFO] | | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile - omitted for duplicate)
[INFO] | | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b06:compile - omitted
for duplicate)
[INFO] | | | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile - omitted for duplic
ate)
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.14:compile
[INFO] | | | +- (org.glassfish.jersey.core:jersey-common:jar:2.14:compile - omitted for d
uplicate)
[INFO] | | | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile - omitted for duplicate)
[INFO] | | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b06:compile - omitted
for duplicate)
[INFO] | | | \- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile - omitted for duplic
ate)
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b06:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b06:compile
[INFO] | | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b06:compile
[INFO] | | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile
[INFO] | | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b06:compile - omitted
for duplicate)
[INFO] | | | +- (org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b06:compile
- omitted for duplicate)
[INFO] | | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile - omitted for duplicate)
[INFO] | | | +- (org.glassfish.hk2:hk2-utils:jar:2.4.0-b06:compile - omitted for duplicat
e)
[INFO] | | | \- (org.javassist:javassist:jar:3.18.1-GA:compile - omitted for duplicate)
[INFO] | | \- (javax.validation:validation-api:jar:1.1.0.Final:compile - omitted for dupli
cate)
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.14:compile
[INFO] | | +- (org.glassfish.hk2.external:javax.inject:jar:2.4.0-b06:compile - omitted for
duplicate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.14:compile - omitted for dupl
icate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-server:jar:2.14:compile - omitted for dupl
icate)
[INFO] | | \- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.14:compile
[INFO] | | +- (org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.14:comp
ile - omitted for duplicate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-common:jar:2.14:compile - omitted for dupl
icate)
[INFO] | | +- (org.glassfish.jersey.core:jersey-server:jar:2.14:compile - omitted for dupl
icate)
[INFO] | | \- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | +- org.glassfish.jersey.ext:jersey-spring3:jar:2.14:compile
[INFO] | | +- (org.glassfish.jersey.core:jersey-server:jar:2.14:compile - omitted for dupl
icate)
[INFO] | | +- (org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.14:comp
ile - omitted for duplicate)
[INFO] | | +- org.glassfish.hk2:hk2:jar:2.4.0-b06:compile
[INFO] | | | +- (org.glassfish.hk2:hk2-utils:jar:2.4.0-b06:compile - omitted for duplicat
e)
[INFO] | | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile - omitted for duplicate)
[INFO] | | | +- org.glassfish.hk2:config-types:jar:2.4.0-b06:compile
[INFO] | | | | \- (org.glassfish.hk2:hk2-config:jar:2.4.0-b06:compile - omitted for dupl
icate)
[INFO] | | | +- org.glassfish.hk2:core:jar:2.4.0-b06:compile
[INFO] | | | | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile - omitted for dup
licate)
[INFO] | | | | \- (org.glassfish.hk2:hk2-utils:jar:2.4.0-b06:compile - omitted for dupli
cate)
[INFO] | | | +- org.glassfish.hk2:hk2-config:jar:2.4.0-b06:compile
[INFO] | | | | +- (org.glassfish.hk2:core:jar:2.4.0-b06:compile - omitted for duplicate)
[INFO] | | | | +- org.jvnet:tiger-types:jar:1.4:compile
[INFO] | | | | \- org.glassfish.hk2.external:bean-validator:jar:2.4.0-b06:compile
[INFO] | | | +- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile - omitted for duplic
ate)
[INFO] | | | +- org.glassfish.hk2:hk2-runlevel:jar:2.4.0-b06:compile
[INFO] | | | | +- (org.glassfish.hk2:hk2-api:jar:2.4.0-b06:compile - omitted for duplica
te)
[INFO] | | | | \- (org.glassfish.hk2:hk2-locator:jar:2.4.0-b06:compile - omitted for dup
licate)
[INFO] | | | \- org.glassfish.hk2:class-model:jar:2.4.0-b06:compile
[INFO] | | | \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.4.0-b06:compile
[INFO] | | +- org.glassfish.hk2:spring-bridge:jar:2.4.0-b06:compile
[INFO] | | | \- (org.springframework:spring-context:jar:4.1.4.RELEASE:compile - version m
anaged from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version manage
d from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed
from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | | +- (org.springframework:spring-web:jar:4.1.4.RELEASE:compile - version managed
from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | | \- (javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile - omitted for duplicate)
[INFO] | \- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.14:compile
[INFO] | +- (org.glassfish.jersey.core:jersey-common:jar:2.14:compile - omitted for dupl
icate)
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.3.2:compile
[INFO] | | +- (com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile - version mana
ged from 2.3.2; omitted for duplicate)
[INFO] | | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile - version
managed from 2.3.2; omitted for duplicate)
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.3.2:compile
[INFO] | | +- (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.3.2:compile - omitt
ed for duplicate)
[INFO] | | +- (com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile - version mana
ged from 2.3.2; omitted for duplicate)
[INFO] | | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile - version
managed from 2.3.2; omitted for duplicate)
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.3.2:co
mpile
[INFO] | | +- (com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile - version m
anaged from 2.3.2; omitted for duplicate)
[INFO] | | \- (com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile - versi
on managed from 2.3.2; omitted for duplicate)
[INFO] | \- (com.fasterxml.jackson.core:jackson-annotations:jar:2.4.4:compile - version
managed from 2.3.2; omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.2.1.RELEASE:compile
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.2.1.RELEASE:compile - omitt
ed for duplicate)
[INFO] | +- (org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.1.RELEASE:compile
- omitted for duplicate)
[INFO] | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile - version manage
d from 2.3.2; omitted for duplicate)
[INFO] | +- (org.hibernate:hibernate-validator:jar:5.1.3.Final:compile - omitted for duplic
ate)
[INFO] | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed fr
om 3.2.3.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-web:jar:4.1.4.RELEASE:compile - version managed fro
m 3.2.3.RELEASE; omitted for duplicate)
[INFO] | \- org.springframework:spring-webmvc:jar:4.1.4.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:4.1.4.RELEASE:compile - version manage
d from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:4.1.4.RELEASE:compile - version mana
ged from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version managed
from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | +- org.springframework:spring-expression:jar:4.1.4.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:4.1.4.RELEASE:compile - version mana
ged from 3.2.3.RELEASE; omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:4.1.4.RELEASE:compile - version managed
from 3.2.3.RELEASE; omitted for duplicate)
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.1.RELEASE:provided (sc
ope not updated to compile)
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.57:provided (version managed
from 8.0.15)
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:7.0.57:provided (version managed fr
om 8.0.15)
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.57:provided (version
managed from 8.0.15)
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:7.0.57:provided (version man
aged from 8.0.15)
[INFO] | \- (org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.57:provided - version man
aged from 8.0.15; omitted for duplicate)
Found the problem: The dependency jersey-container-servlet-core is only suitable for servlet containers with less than Servlet 3.0 specification. Since you use Tomcat 7, which implements Servlet 3.0, you have to use jersey-container-servlet. See the Jersey documentation here: https://jersey.java.net/documentation/latest/modules-and-dependencies.html#servlet-app-general
If you run the application as standalone app (i.e. not deploy it into Tomcat), you have to make sure, that the dependency spring-boot-starter-tomcat is in scope "compile". Currently the dependency has the scope "provided", which means, the dependency is not on the classpath when running the application.
If you want to run your application both in Tomcat and as standalone app, you have to use Maven profiles and build two WARs, one with spring-boot-starter-tomcat as provided, and one with spring-boot-starter-tomcat as compile.

Resources