I have a project that uses Spring 4.2.2. In this project I use another one of my projects that depends on spring-ws 2.2.2. Seems like spring-ws wants to use spring-aop and other spring libraries in version 4.0.9. When I want to deploy and run my web service this seemingly results in:
java.lang.NoSuchMethodError: org.springframework.aop.scope.ScopedProxyUtils.isScopedTarget
isScopedTarget wasn't defined until spring 4.1.4 according to https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/aop/scope/ScopedProxyUtils.html.
So: Is there any way I can use spring-ws 2.2.2 together with spring 4.2.x?
Here's output from running mvn dependency:tree on the including project:
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # net4care-mhd-fhir-server ---
[INFO] ca.uhn.hapi.fhir:net4care-mhd-fhir-server:war:1.3-SNAPSHOT
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-base:jar:1.3-SNAPSHOT:compile
[INFO] | +- javax.json:javax.json-api:jar:1.0:compile
[INFO] | +- org.glassfish:javax.json:jar:1.0.4:compile
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] | | +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | +- commons-io:commons-io:jar:2.4:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.10:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.10:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.4:compile
[INFO] | \- org.apache.httpcomponents:httpcore:jar:4.4:compile
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:jar:1.3-SNAPSHOT:compile
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:war:1.3-SNAPSHOT:provided
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO] +- org.thymeleaf:thymeleaf:jar:2.1.4.RELEASE:compile
[INFO] | +- ognl:ognl:jar:3.0.8:compile
[INFO] | +- org.javassist:javassist:jar:3.16.1-GA:compile
[INFO] | \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] +- org.ebaysf.web:cors-filter:jar:1.0.1:compile
[INFO] +- org.net4care:xds-connector:jar:0.0.6-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-test:jar:4.2.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-core:jar:4.2.1.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-ws-core:jar:2.2.2.RELEASE:compile
[INFO] | | +- org.springframework.ws:spring-xml:jar:2.2.2.RELEASE:compile
[INFO] | | | \- org.springframework:spring-context:jar:4.2.1.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.0.9.RELEASE:compile
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.2.1.RELEASE:compile
[INFO] | | +- org.springframework:spring-oxm:jar:4.0.9.RELEASE:compile
[INFO] | | +- org.springframework:spring-web:jar:4.2.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:4.2.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:4.2.1.RELEASE:compile
[INFO] | +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.14:compile
[INFO] | | +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:compile
[INFO] | | +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | | +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] | | \- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] | +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.14:compile
[INFO] | \- xmlunit:xmlunit:jar:1.6:compile
[INFO] +- net.sourceforge.cobertura:cobertura:jar:2.1.1:provided
[INFO] | +- org.ow2.asm:asm:jar:5.0.1:provided
[INFO] | +- org.ow2.asm:asm-tree:jar:5.0.1:provided
[INFO] | +- org.ow2.asm:asm-commons:jar:5.0.1:provided
[INFO] | +- org.ow2.asm:asm-util:jar:5.0.1:provided
[INFO] | +- org.ow2.asm:asm-analysis:jar:5.0.1:provided
[INFO] | +- oro:oro:jar:2.0.8:provided
[INFO] | +- jaxen:jaxen:jar:1.1.4:compile
[INFO] | +- org.apache.ant:ant:jar:1.8.3:provided
[INFO] | | \- org.apache.ant:ant-launcher:jar:1.8.3:provided
[INFO] | +- org.apache.ant:ant-junit:jar:1.8.3:provided
[INFO] | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:provided
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1.14:provided
[INFO] | \- com.sun:tools:jar:0:system
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.hamcrest:java-hamcrest:jar:2.0.0.0:test
[INFO] \- org.mockito:mockito-all:jar:1.10.19:test
I solved the issue by adding the following exclusion to the pom of the including project:
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>2.2.2.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
</dependency>
Related
I'm migrating a project from Spring Boot 2.6.1 to Spring Boot 3.0.2 and I'm having problems with log4j dependencies versions. I have modified all the dependencies that were giving me problems but I still couldn't solve the problem. The error is as follows:
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/C:/Users/Pablo/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.18.0/log4j-slf4j-impl-2.18.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
ERROR [2023-01-27 11:54:41] [ org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter report 40]
***************************
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.boot.logging.log4j2.Log4J2LoggingSystem.initialize(Log4J2LoggingSystem.java:242)
The following method did not exist:
'void org.apache.logging.log4j.util.PropertiesUtil.addPropertySource(org.apache.logging.log4j.util.PropertySource)'
The calling method's class, org.springframework.boot.logging.log4j2.Log4J2LoggingSystem, was loaded from the following location:
jar:file:/C:/Users/Pablo/.m2/repository/org/springframework/boot/spring-boot/3.0.2/spring-boot-3.0.2.jar!/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.class
The called method's class, org.apache.logging.log4j.util.PropertiesUtil, is available from the following locations:
jar:file:/C:/Users/Pablo/.m2/repository/org/apache/logging/log4j/log4j-api/2.18.0/log4j-api-2.18.0.jar!/org/apache/logging/log4j/util/PropertiesUtil.class
The called method's class hierarchy was loaded from the following locations:
org.apache.logging.log4j.util.PropertiesUtil: file:/C:/Users/Pablo/.m2/repository/org/apache/logging/log4j/log4j-api/2.18.0/log4j-api-2.18.0.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.logging.log4j2.Log4J2LoggingSystem and org.apache.logging.log4j.util.PropertiesUtil
Process finished with exit code 0
And the service dependencies are:
--- maven-dependency-plugin:2.8:tree (default-cli) # core ---
[INFO] es._3xs.adp:core:jar:1.0-SNAPSHOT
[INFO] +- es._3xs.adp:library:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-configuration-processor:jar:3.0.2:compile
[INFO] | +- org.springframework:spring-websocket:jar:6.0.4:compile
[INFO] | | \- org.springframework:spring-context:jar:6.0.4:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:2.0.0:compile
[INFO] | +- com.opencsv:opencsv:jar:5.5.2:compile
[INFO] | | +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] | | +- org.apache.commons:commons-text:jar:1.9:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] | \- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] | \- commons-codec:commons-codec:jar:1.15:compile
[INFO] +- org.springframework.data:spring-data-redis:jar:3.0.1:compile
[INFO] | +- org.springframework.data:spring-data-keyvalue:jar:3.0.1:compile
[INFO] | | \- org.springframework.data:spring-data-commons:jar:3.0.1:compile
[INFO] | +- org.springframework:spring-tx:jar:6.0.4:compile
[INFO] | +- org.springframework:spring-oxm:jar:6.0.4:compile
[INFO] | +- org.springframework:spring-aop:jar:6.0.4:compile
[INFO] | +- org.springframework:spring-context-support:jar:6.0.4:compile
[INFO] | \- org.slf4j:slf4j-api:jar:2.0.6:compile
[INFO] +- redis.clients:jedis:jar:3.7.0:compile
[INFO] | \- org.apache.commons:commons-pool2:jar:2.11.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-websocket:jar:3.0.2:compile
[INFO] | \- org.springframework:spring-messaging:jar:6.0.4:compile
[INFO] +- commons-io:commons-io:jar:2.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:3.0.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:3.0.2:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.33:compile
[INFO] | \- org.eclipse.angus:jakarta.mail:jar:1.0.0:compile
[INFO] | \- org.eclipse.angus:angus-activation:jar:1.0.0:runtime
[INFO] +- uk.org.webcompere:system-stubs-junit4:jar:1.2.0:test
[INFO] | \- uk.org.webcompere:system-stubs-core:jar:1.2.0:test
[INFO] +- com.h2database:h2:jar:1.4.200:compile
[INFO] +- org.apache.httpcomponents.client5:httpclient5:jar:5.2.1:compile
[INFO] | +- org.apache.httpcomponents.core5:httpcore5:jar:5.1.5:compile
[INFO] | \- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.1.5:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:3.0.2:compile
[INFO] | \- org.thymeleaf:thymeleaf-spring6:jar:3.1.1.RELEASE:compile
[INFO] | \- org.thymeleaf:thymeleaf:jar:3.1.1.RELEASE:compile
[INFO] | +- org.attoparser:attoparser:jar:2.0.6.RELEASE:compile
[INFO] | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-rest:jar:3.0.2:compile
[INFO] | \- org.springframework.data:spring-data-rest-webmvc:jar:4.0.1:compile
[INFO] | \- org.springframework.data:spring-data-rest-core:jar:4.0.1:compile
[INFO] | +- org.springframework.hateoas:spring-hateoas:jar:2.0.1:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:3.0.0:compile
[INFO] | \- org.atteo:evo-inflector:jar:1.3:compile
[INFO] +- org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar:3.0.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:3.0.2:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:3.0.2:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:3.0.2:compile
[INFO] +- org.springframework.ldap:spring-ldap-core:jar:2.3.6.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:6.0.4:compile
[INFO] | \- org.springframework:spring-core:jar:6.0.4:compile
[INFO] | \- org.springframework:spring-jcl:jar:6.0.4:compile
[INFO] +- com.github.wvengen:proguard-maven-plugin:jar:2.6.0:compile
[INFO] | +- org.apache.ant:ant:jar:1.10.12:compile
[INFO] | | \- org.apache.ant:ant-launcher:jar:1.10.12:compile
[INFO] | +- org.apache.maven:maven-archiver:jar:2.4:compile
[INFO] | | +- org.apache.maven:maven-artifact:jar:2.0:compile
[INFO] | | +- org.apache.maven:maven-model:jar:2.0:compile
[INFO] | | +- org.apache.maven:maven-project:jar:2.0:compile
[INFO] | | | +- org.apache.maven:maven-profile:jar:2.0:compile
[INFO] | | | +- org.apache.maven:maven-artifact-manager:jar:2.0:compile
[INFO] | | | | +- org.apache.maven:maven-repository-metadata:jar:2.0:compile
[INFO] | | | | \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:compile
[INFO] | | | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
[INFO] | | | \- classworlds:classworlds:jar:1.1-alpha-2:compile
[INFO] | | +- org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-11:compile
[INFO] | | | +- org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-15:compile
[INFO] | | | \- org.codehaus.plexus:plexus-io:jar:1.0-alpha-3:compile
[INFO] | | +- org.codehaus.plexus:plexus-utils:jar:1.4.9:compile
[INFO] | | \- org.codehaus.plexus:plexus-interpolation:jar:1.6:compile
[INFO] | \- org.apache.maven:maven-plugin-api:jar:3.8.6:compile
[INFO] | +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.5:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.5:compile
[INFO] | | \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[INFO] | \- org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.22:compile
[INFO] +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-oauth2:jar:2.2.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-security:jar:2.2.5.RELEASE:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-security:jar:2.2.5.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-starter-security:jar:3.0.2:compile
[INFO] | +- org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:jar:2.1.2.RELEASE:compile
[INFO] | | +- org.springframework.security.oauth:spring-security-oauth2:jar:2.3.4.RELEASE:compile
[INFO] | | | +- org.springframework.security:spring-security-core:jar:6.0.1:compile
[INFO] | | | +- org.springframework.security:spring-security-config:jar:6.0.1:compile
[INFO] | | | +- org.springframework.security:spring-security-web:jar:6.0.1:compile
[INFO] | | | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | | \- org.springframework.security:spring-security-jwt:jar:1.0.9.RELEASE:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.0:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:4.0.1:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:4.1.1:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:2.1.0:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:2.1.0:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:2.1.1:compile
[INFO] +- com.sun.xml.bind:jaxb-core:jar:3.0.2:compile
[INFO] | \- com.sun.activation:jakarta.activation:jar:2.0.1:compile
[INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile
[INFO] +- javax.xml.bind:jaxb-api:jar:2.4.0-b180830.0359:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.13.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.14.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.14.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.14.1:compile
[INFO] | +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] | \- com.fasterxml.woodstox:woodstox-core:jar:6.2.6:compile
[INFO] +- net.sourceforge.jtds:jtds:jar:1.3.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:3.0.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:3.0.2:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.19:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:3.0.2:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:5.0.1:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:6.0.4:compile
[INFO] | +- org.hibernate.orm:hibernate-core:jar:6.1.6.Final:compile
[INFO] | | +- jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
[INFO] | | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.5.0.Final:runtime
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:6.0.2.Final:runtime
[INFO] | | +- org.jboss:jandex:jar:2.4.2.Final:runtime
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1:runtime
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.12.22:runtime
[INFO] | | +- jakarta.inject:jakarta.inject-api:jar:2.0.0:runtime
[INFO] | | \- org.antlr:antlr4-runtime:jar:4.10.1:runtime
[INFO] | +- org.springframework.data:spring-data-jpa:jar:3.0.1:compile
[INFO] | | \- org.springframework:spring-orm:jar:6.0.4:compile
[INFO] | \- org.springframework:spring-aspects:jar:6.0.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:3.0.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:3.0.2:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.14.1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.14.1:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.14.1:compile
[INFO] | +- org.springframework:spring-web:jar:6.0.4:compile
[INFO] | \- org.springframework:spring-webmvc:jar:6.0.4:compile
[INFO] | \- org.springframework:spring-expression:jar:6.0.4:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.18.0:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.18.0:compile
[INFO] +- org.apache.logging.log4j:log4j-jul:jar:2.18.0:compile
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.18.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:2.6.3:compile
[INFO] | \- org.slf4j:jul-to-slf4j:jar:2.0.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jetty:jar:3.0.2:compile
[INFO] | +- jakarta.servlet:jakarta.servlet-api:jar:6.0.0:compile
[INFO] | +- jakarta.websocket:jakarta.websocket-api:jar:2.1.0:compile
[INFO] | +- jakarta.websocket:jakarta.websocket-client-api:jar:2.1.0:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.5:compile
[INFO] | +- org.eclipse.jetty:jetty-servlets:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty:jetty-http:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty:jetty-util:jar:11.0.13:compile
[INFO] | | \- org.eclipse.jetty:jetty-io:jar:11.0.13:compile
[INFO] | +- org.eclipse.jetty:jetty-webapp:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty:jetty-server:jar:11.0.13:compile
[INFO] | | \- org.eclipse.jetty:jetty-xml:jar:11.0.13:compile
[INFO] | +- org.eclipse.jetty.websocket:websocket-jakarta-server:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty.websocket:websocket-jakarta-client:jar:11.0.13:compile
[INFO] | | | +- org.eclipse.jetty.websocket:websocket-jakarta-common:jar:11.0.13:compile
[INFO] | | | +- org.eclipse.jetty.websocket:websocket-core-client:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty:jetty-client:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty:jetty-alpn-client:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty.websocket:websocket-servlet:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty.websocket:websocket-core-server:jar:11.0.13:compile
[INFO] | | \- org.eclipse.jetty:jetty-annotations:jar:11.0.13:compile
[INFO] | | +- org.eclipse.jetty:jetty-plus:jar:11.0.13:compile
[INFO] | | | \- org.eclipse.jetty:jetty-jndi:jar:11.0.13:compile
[INFO] | | +- org.ow2.asm:asm:jar:9.4:compile
[INFO] | | \- org.ow2.asm:asm-commons:jar:9.4:compile
[INFO] | | \- org.ow2.asm:asm-tree:jar:9.4:compile
[INFO] | \- org.eclipse.jetty.websocket:websocket-jetty-server:jar:11.0.13:compile
[INFO] | +- org.eclipse.jetty.websocket:websocket-jetty-api:jar:11.0.13:compile
[INFO] | \- org.eclipse.jetty.websocket:websocket-jetty-common:jar:11.0.13:compile
[INFO] | \- org.eclipse.jetty.websocket:websocket-core-common:jar:11.0.13:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:3.0.2:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:3.0.2:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:3.0.2:compile
[INFO] | \- io.micrometer:micrometer-observation:jar:1.10.3:compile
[INFO] | \- io.micrometer:micrometer-commons:jar:1.10.3:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:3.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:3.1.0:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:3.1.0:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:6.0.1:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-commons:jar:3.1.0:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.10.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:3.1.0:compile
[INFO] | +- com.netflix.eureka:eureka-client:jar:1.10.17:compile
[INFO] | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:compile
[INFO] | | | +- com.netflix.netflix-commons:netflix-infix:jar:0.3.0:runtime
[INFO] | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | +- joda-time:joda-time:jar:2.3:runtime
[INFO] | | | | +- org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | +- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | | \- antlr:antlr:jar:2.7.7:runtime
[INFO] | | | | \- com.google.code.gson:gson:jar:2.9.1:runtime
[INFO] | | | \- org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | +- com.thoughtworks.xstream:xstream:jar:1.4.18:compile
[INFO] | | | \- io.github.x-stream:mxparser:jar:1.2.2:compile
[INFO] | | | \- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | | +- com.netflix.servo:servo-core:jar:0.12.21:compile
[INFO] | | | \- com.google.guava:guava:jar:19.0:compile
[INFO] | | +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.google.inject:guice:jar:4.1.0:compile
[INFO] | | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- org.codehaus.jettison:jettison:jar:1.4.0:runtime
[INFO] | +- com.netflix.eureka:eureka-core:jar:1.10.17:compile
[INFO] | \- org.springframework.cloud:spring-cloud-starter-loadbalancer:jar:3.1.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-loadbalancer:jar:3.1.0:compile
[INFO] | | +- io.projectreactor:reactor-core:jar:3.5.2:compile
[INFO] | | | \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] | | \- io.projectreactor.addons:reactor-extra:jar:3.5.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-cache:jar:3.0.2:compile
[INFO] | \- com.stoyanr:evictor:jar:1.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:3.0.2:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.0.2:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.7.0:compile
[INFO] | | \- net.minidev:json-smart:jar:2.4.8:compile
[INFO] | | \- net.minidev:accessors-smart:jar:2.4.8:compile
[INFO] | +- org.assertj:assertj-core:jar:3.23.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.9.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.9.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | +- org.junit.platform:junit-platform-commons:jar:1.9.2:test
[INFO] | | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.9.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.9.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.9.2:test
[INFO] | +- org.mockito:mockito-core:jar:4.8.1:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.12.22:test
[INFO] | | \- org.objenesis:objenesis:jar:3.2:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:4.8.1:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:6.0.4:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.9.1:test
[INFO] +- org.springframework.boot:spring-boot-test:jar:3.0.2:compile
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] +- io.micrometer:micrometer-core:jar:1.8.1:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] \- io.micrometer:micrometer-registry-prometheus:jar:1.8.0:compile
[INFO] \- io.prometheus:simpleclient_common:jar:0.16.0:compile
[INFO] \- io.prometheus:simpleclient:jar:0.16.0:compile
[INFO] +- io.prometheus:simpleclient_tracer_otel:jar:0.16.0:compile
[INFO] | \- io.prometheus:simpleclient_tracer_common:jar:0.16.0:compile
[INFO] \- io.prometheus:simpleclient_tracer_otel_agent:jar:0.16.0:compile
[INFO]
Does anyone know which versions of the dependencies are compatible with each other?
I would hazard a guess this is because you have a property defined like so in your original project:
<log4j2.version>2.18.0</log4j2.version>
This is a very normal (and important!) thing to see with Spring Boot 2.x projects because of log4shell - by default Spring Boot 2.6.1 depends on a vulnerable version, so there must be some kind of property like this in the original pom that's bringing it up to 2.18.
Spring Boot 3.0.2 depends on log4j 2.19 which isn't vulnerable, so once again, you must have a property explicitly setting it to 2.18 for this to be an issue. Such a property isn't needed (and as you've found, is a regression that makes it incompatible anyway.)
Delete that explicit log4j2.version property, clean and rebuild, and you should be fine.
Does anyone know which versions of the dependencies are compatible with each other?
Spring-boot does. Stop forcing versions of dependencies managed by boot and you'll stop having incompatibility issues.
Also, you are changing a major version => expect breaking changes and modifications in your code.
Maybe should you refer to migration guide?
Apparently, there is some kind of incompatibility with the log4j version so I had to force it to use version 2.19.0. With that, it worked.
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
<version>3.0.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
I getting this warning while running application.
I tried solution [here][1]
but it is not working ,I am not sure what am I missing, could anyone help here?
Thanks in advance.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/macuser/.m2/repository/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/macuser/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.17.1/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Parent Pom.xml after running mvn dependency:tree
[INFO] com.share:ekacloud-backend-share:pom:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.6.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.6.3:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.6.3:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.6.3:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.10:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.10:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.17.1:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.33:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | +- org.springframework:spring-core:jar:5.3.15:compile
[INFO] | | | \- org.springframework:spring-jcl:jar:5.3.15:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.29:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.6.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.13.1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.1:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.13.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.6.3:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.56:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.56:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.56:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.15:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.3.15:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.15:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.15:compile
[INFO] | +- org.springframework:spring-context:jar:5.3.15:compile
[INFO] | \- org.springframework:spring-expression:jar:5.3.15:compile
[INFO] +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- com.commons:commons-cache:jar:0.0.81:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.6.3:compile
[INFO] | +- org.springframework.data:spring-data-redis:jar:2.6.1:compile
[INFO] | | +- org.springframework.data:spring-data-keyvalue:jar:2.6.1:compile
[INFO] | | | \- org.springframework.data:spring-data-commons:jar:2.6.1:compile
[INFO] | | +- org.springframework:spring-tx:jar:5.3.15:compile
[INFO] | | +- org.springframework:spring-oxm:jar:5.3.15:compile
[INFO] | | \- org.springframework:spring-context-support:jar:5.3.15:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] | \- com.google.code.gson:gson:jar:2.8.9:compile
[INFO] +- com.github.docker-java:docker-java:jar:3.0.13:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.13.1:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.13.1:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.13.1: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.glassfish.jersey.connectors:jersey-apache-connector:jar:2.35:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.35:compile
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:compile
[INFO] | | \- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.15:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.35:compile
[INFO] | | \- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[INFO] | +- com.kohlschutter.junixsocket:junixsocket-common:jar:2.0.4:compile
[INFO] | | \- log4j:log4j:jar:1.2.17:compile
[INFO] | +- com.kohlschutter.junixsocket:junixsocket-native-common:jar:2.0.4:compile
[INFO] | | \- org.scijava:native-lib-loader:jar:2.0.2:compile
[INFO] | +- org.apache.commons:commons-compress:jar:1.12:compile
[INFO] | +- commons-codec:commons-codec:jar:1.15:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-io:commons-io:jar:2.5:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.33:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.33:compile
[INFO] | +- com.google.guava:guava:jar:19.0:compile
[INFO] | +- org.bouncycastle:bcpkix-jdk15on:jar:1.54:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.54:compile
[INFO] | +- io.netty:netty-codec-http:jar:4.1.73.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.73.Final:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.1.73.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.73.Final:compile
[INFO] | | \- io.netty:netty-codec:jar:4.1.73.Final:compile
[INFO] | +- io.netty:netty-handler:jar:4.1.73.Final:compile
[INFO] | | +- io.netty:netty-resolver:jar:4.1.73.Final:compile
[INFO] | | \- io.netty:netty-tcnative-classes:jar:2.0.46.Final:compile
[INFO] | +- io.netty:netty-handler-proxy:jar:4.1.73.Final:compile
[INFO] | | \- io.netty:netty-codec-socks:jar:4.1.73.Final:compile
[INFO] | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.73.Final:compile
[INFO] | | +- io.netty:netty-transport-native-unix-common:jar:4.1.73.Final:compile
[INFO] | | \- io.netty:netty-transport-classes-epoll:jar:4.1.73.Final:compile
[INFO] | \- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.73.Final:compile
[INFO] | \- io.netty:netty-transport-classes-kqueue:jar:4.1.73.Final:compile
[INFO] +- com.commons:commons-ssm:jar:0.0.81:compile
[INFO] | \- com.amazonaws:aws-java-sdk-ssm:jar:1.11.225:compile
[INFO] | +- com.amazonaws:aws-java-sdk-core:jar:1.11.225:compile
[INFO] | | +- software.amazon.ion:ion-java:jar:1.0.2:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.13.1:compile
[INFO] | | \- joda-time:joda-time:jar:2.8.1:compile
[INFO] | \- com.amazonaws:jmespath-java:jar:1.11.225:compile
[INFO] +- com.commons:commons-error:jar:0.0.81:compile
[INFO] +- com.commons:commons-client:jar:0.0.81:compile
[INFO] +- com.commons:commons-util:jar:0.0.81:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.1:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.13.1:compile
[INFO] | \- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] +- com.commons:commons-model:jar:0.0.81:compile
[INFO] | +- org.springframework.security:spring-security-core:jar:5.6.1:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:5.6.1:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.13:compile
[INFO] | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | \- com:ess-model-java:jar:1.6.0:compile
[INFO] | +- io.gsonfire:gson-fire:jar:1.8.0:runtime
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.3.2:runtime
[INFO] +- org.powermock:powermock-module-junit4:jar:1.7.4:compile
[INFO] | +- org.powermock:powermock-module-junit4-common:jar:1.7.4:compile
[INFO] | | +- org.powermock:powermock-reflect:jar:1.7.4:compile
[INFO] | | \- org.powermock:powermock-core:jar:1.7.4:compile
[INFO] | | \- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | +- junit:junit:jar:4.13.2:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:compile
[INFO] | \- org.hamcrest:hamcrest:jar:2.2:compile
[INFO] +- com.github.kstyrc:embedded-redis:jar:0.6:compile
[INFO] +- com.squareup.okhttp3:okhttp:jar:3.8.1:compile
[INFO] | \- com.squareup.okio:okio:jar:1.13.0:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.17.1:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.17.1:compile
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.17.1:compile
[INFO] +- org.powermock:powermock-api-mockito2:jar:1.7.4:test
[INFO] | \- org.powermock:powermock-api-mockito-common:jar:1.7.4:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.7.4:test
[INFO] +- org.flywaydb:flyway-core:jar:4.2.0: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.mockito:mockito-core:jar:4.3.1:test
[INFO] +- net.bytebuddy:byte-buddy:jar:1.11.22:test
[INFO] +- net.bytebuddy:byte-buddy-agent:jar:1.11.22:test
[INFO] \- org.objenesis:objenesis:jar:3.2:compile
I thought it is coming from spring-boot-starter-web and tried to add exclusion here but it did not work.
You have to use the information SLF4J provide you and back trace the dependency using dependency:tree and its includes option.
This message:
SLF4J: Found binding in [jar:file:/Users/macuser/.m2/repository/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/macuser/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.17.1/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
Means that the following dependencies are being imported:
ch.qos.logback:logback-classic:1.2.10:jar
org.apache.logging.log4j:log4j-slf4j-impl:2.17.1:jar
Then you can filter your dependency tree using -Dincludes=
mvn dependency:tree '-Dincludes=ch.qos.logback:logback-classic,org.apache.logging.log4j:log4j-slf4j-impl'
You may omit the version and type here because that's not really important.
This will give you the exact dependencies you will have to exclude.
And from the dependencies you reference, I think your problem lies in the use of Log4J2 with a SLF4J bindings whereas spring boot use SLF4J with Logback as default implementation.
You can read this to use log4j2 with Spring boot: https://www.callicoder.com/spring-boot-log4j-2-example/
I have a Maven project and need to get rid of xml-apis library. It somehow always gets included. It is not seen in the dependency tree. Here is the dependency tree:
[INFO] com.softgile:asan:atlassian-plugin:1.0.1-SNAPSHOT
[INFO] +- com.atlassian.jira:jira-api:jar:8.12.0:provided
[INFO] | +- com.atlassian.annotations:atlassian-annotations:jar:2.1.0:provided
[INFO] | | \- com.google.code.findbugs:jsr305:jar:3.0.0:provided
[INFO] | +- com.atlassian.ofbiz:entityengine-share:jar:1.5.0:provided
[INFO] | +- com.atlassian.ofbiz:entityengine:jar:1.5.0:provided
[INFO] | | \- jta:jta:jar:1.0.1:provided
[INFO] | +- com.atlassian.collectors:atlassian-collectors-util:jar:1.1:provided
[INFO] | +- opensymphony:webwork:jar:1.4-atlassian-30:provided
[INFO] | | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided
[INFO] | +- webwork:pell-multipart-request:jar:1.31.0:provided
[INFO] | +- com.atlassian.core:atlassian-core:jar:7.0.2:provided
[INFO] | | +- dom4j:dom4j:jar:1.6.1-atlassian-2:provided
[INFO] | | \- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided
[INFO] | +- com.atlassian.core:atlassian-core-user:jar:7.0.2:provided
[INFO] | +- com.atlassian.core:atlassian-core-thumbnail:jar:7.0.2:provided
[INFO] | | +- com.twelvemonkeys.imageio:imageio-jpeg:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.imageio:imageio-core:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.imageio:imageio-metadata:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.common:common-lang:jar:3.4.1:provided
[INFO] | | | +- com.twelvemonkeys.common:common-io:jar:3.4.1:provided
[INFO] | | | \- com.twelvemonkeys.common:common-image:jar:3.4.1:provided
[INFO] | | \- com.twelvemonkeys.imageio:imageio-tiff:jar:3.4.1:provided
[INFO] | +- com.atlassian.extras:atlassian-extras:jar:3.2:provided
[INFO] | +- com.atlassian.velocity:atlassian-velocity:jar:1.3:provided
[INFO] | | +- opensymphony:oscore:jar:2.2.7:provided
[INFO] | | \- org.apache.velocity:velocity:jar:1.6.4:provided
[INFO] | +- osworkflow:osworkflow:jar:2.9.0-atlassian-1:provided
[INFO] | +- opensymphony:propertyset:jar:1.5:provided
[INFO] | +- com.atlassian.cache:atlassian-cache-api:jar:4.0.2:provided
[INFO] | | +- com.atlassian.instrumentation:atlassian-instrumentation-core:jar:3.0.0:provided
[INFO] | | \- io.atlassian.util.concurrent:atlassian-util-concurrent:jar:4.0.1:provided
[INFO] | +- com.atlassian.beehive:beehive-api:jar:4.0.2:provided
[INFO] | +- com.atlassian.tenancy:atlassian-tenancy-api:jar:3.0.1:provided
[INFO] | | \- com.atlassian.event:atlassian-event:jar:4.0.0:provided
[INFO] | +- com.atlassian.upgrade:upgrade-task-framework-api:jar:2.0.2:provided
[INFO] | +- com.atlassian.crowd:embedded-crowd-api:jar:4.0.2:provided
[INFO] | +- com.google.guava:guava:jar:26.0-jre:provided
[INFO] | | +- org.checkerframework:checker-qual:jar:2.5.2:provided
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:provided
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:provided
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:provided
[INFO] | +- com.atlassian.fugue:fugue:jar:2.7.0:provided
[INFO] | +- io.atlassian.fugue:fugue:jar:4.7.2:provided
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13-atlassian-4:provided
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13-atlassian-4:provided
[INFO] | +- com.sun.mail:jakarta.mail:jar:1.6.5:provided
[INFO] | | \- com.sun.activation:jakarta.activation:jar:1.2.1:provided
[INFO] | +- com.atlassian.mail:atlassian-mail:jar:5.0.3:provided
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.6.1:provided
[INFO] | | \- commons-digester:commons-digester:jar:1.4.1:provided
[INFO] | +- oro:oro:jar:2.0.7:provided
[INFO] | +- com.atlassian.threadlocal:atlassian-threadlocal:jar:1.3:provided
[INFO] | +- com.atlassian.applinks:applinks-api:jar:8.0.0:provided
[INFO] | +- com.google.javascript:closure-compiler-unshaded:jar:v20181008:provided
[INFO] | | +- com.google.javascript:closure-compiler-externs:jar:v20181008:provided
[INFO] | | +- args4j:args4j:jar:2.0.26:provided
[INFO] | | +- com.google.protobuf:protobuf-java:jar:3.0.2:provided
[INFO] | | \- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
[INFO] | +- com.atlassian.velocity.htmlsafe:velocity-htmlsafe:jar:3.1.0:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-api:jar:5.3.7:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment:jar:5.0.0:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment-api:jar:5.0.0:provided
[INFO] | +- com.atlassian.ozymandias:atlassian-plugin-point-safety:jar:1.0.0:provided
[INFO] | +- jfree:jfreechart:jar:1.0.13:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource:jar:4.1.3:provided
[INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-spi:jar:4.1.3:provided
[INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-api:jar:4.1.3:provided
[INFO] | | +- org.tuckey:urlrewritefilter:jar:4.0.4:provided
[INFO] | | \- com.atlassian.sourcemap:sourcemap:jar:1.7.6:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource-compiler-gcc:jar:4.1.3:provided
[INFO] | +- jfree:jcommon:jar:1.0.8:provided
[INFO] | +- com.atlassian.gadgets:atlassian-gadgets-api:jar:5.0.0:provided
[INFO] | +- com.atlassian.johnson:atlassian-johnson-core:jar:4.0.0:provided
[INFO] | | \- com.atlassian.plugins:atlassian-plugins-servlet:jar:5.0.0:provided
[INFO] | +- joda-time:joda-time:jar:2.10.5:provided
[INFO] | +- commons-lang:commons-lang:jar:2.6:provided
[INFO] | +- org.apache.commons:commons-lang3:jar:3.8:provided
[INFO] | +- commons-io:commons-io:jar:2.6:provided
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1-atlassian-2:provided
[INFO] | +- log4j:log4j:jar:1.2.17-atlassian-2:provided
[INFO] | +- com.atlassian.profiling:atlassian-profiling:jar:3.2.0:provided
[INFO] | +- com.atlassian.scheduler:atlassian-scheduler-api:jar:3.0.0:provided
[INFO] | +- com.atlassian.analytics:analytics-api:jar:6.1.6:provided
[INFO] | +- com.atlassian.application:atlassian-application-api:jar:2.0.0:provided
[INFO] | \- com.atlassian:lucene-extras:jar:7.3.1-atlassian-4:provided
[INFO] +- junit:junit:jar:4.10:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- com.atlassian.plugin:atlassian-spring-scanner-annotation:jar:1.2.13:provided
[INFO] +- javax.inject:javax.inject:jar:1:provided
[INFO] +- com.atlassian.plugins:atlassian-plugins-osgi-testrunner:jar:2.0.1:test
[INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:provided
[INFO] +- com.google.code.gson:gson:jar:2.2.2-atlassian-1:compile
[INFO] +- org.mockito:mockito-all:jar:1.8.5:test
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- javax.xml.bind:jaxb-api:jar:2.3.1:provided
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:provided
[INFO] +- com.atlassian.plugins.rest:atlassian-rest-common:jar:1.0.2:provided
[INFO] | +- com.atlassian.plugins.rest:com.atlassian.jersey-library:pom:1.0.2:provided
[INFO] | | +- com.sun.jersey:jersey-server:jar:1.0.3:provided
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.0.3:provided
[INFO] | | | \- asm:asm:jar:3.1:provided
[INFO] | | +- com.sun.jersey:jersey-json:jar:1.0.3:provided
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.0.1:provided
[INFO] | | | \- org.codehaus.jackson:jackson-asl:jar:0.9.4:provided
[INFO] | | \- commons-fileupload:commons-fileupload:jar:1.2.1:provided
[INFO] | \- net.sourceforge.findbugs:jsr305:jar:1.3.2:provided
[INFO] +- com.atlassian.sal:sal-api:jar:3.0.7:provided
[INFO] +- org.apache.wink:wink-client:jar:1.4:test
[INFO] | +- org.apache.wink:wink-common:jar:1.4:test
[INFO] | | +- org.apache.geronimo.specs:geronimo-jaxrs_1.1_spec:jar:1.0:test
[INFO] | | \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:test
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.2.1.1:provided
[INFO] | \- javax.activation:activation:jar:1.1:test
[INFO] +- org.slf4j:slf4j-api:jar:1.6.6:provided
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.1:test
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.1:test
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:test
[INFO] | \- commons-codec:commons-codec:jar:1.4:provided
[INFO] +- com.atlassian.templaterenderer:atlassian-template-renderer-api:jar:2.0.0:provided
[INFO] | \- commons-collections:commons-collections:jar:3.2.1:provided
[INFO] +- org.misclient:misclient:jar:1.0:compile
[INFO] +- com.atlassian.aui:auiplugin:jar:8.0.0:provided
[INFO] +- com.atlassian.upm:licensing-api:jar:2.21.4:provided
[INFO] \- com.atlassian.upm:upm-api:jar:2.21:provided
I have even tried to add an exclusion
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
to every dependency in pom.xml, but xml-apis is still getting included. I guess it can be excluded dynamically somehow using OSGI services, but don't know how to do it. Any ideas? Thank you
I get the following stacktrace while deploying when trying to update to Spring 5.1 from 4.3. Server is WildFly 14. Runtime is JDK 11. Compiler target is 1.8.
I tried cleaning dependecies, but nothing help. Further below is dependency:tree output.
22:23:51,323 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."BDOS-POP.war".component."org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener".WeldInstantiator: org.jboss.msc.service.StartException in service jboss.deployment.unit."BDOS-POP.war".component."org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener".WeldInstantiator: Failed to start service
at org.jboss.msc#1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1728)
at org.jboss.msc#1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads#2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads#2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads#2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:186)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:232)
at org.jboss.as.weld#14.0.0.Final//org.jboss.as.weld.injection.InjectionTargets.createInjectionTarget(InjectionTargets.java:60)
at org.jboss.as.weld#14.0.0.Final//org.jboss.as.weld.injection.WeldComponentService.start(WeldComponentService.java:120)
at org.jboss.msc#1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc#1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Failed to link org/springframework/http/server/reactive/ServletServerHttpResponse$ResponseBodyProcessor (Module "deployment.BDOS-POP.war" from Service Module Loader): Failed to link org/springframework/http/server/reactive/AbstractListenerWriteProcessor (Module "deployment.BDOS-POP.war" from Service Module Loader): org/reactivestreams/Processor
at java.base/java.lang.Class.getDeclaringClass0(Native Method)
at java.base/java.lang.Class.getDeclaringClass(Class.java:1472)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.reflection.Reflections.checkDeclaringClassLoadable(Reflections.java:427)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:83)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.apply(ClassTransformer.java:79)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.lambda$null$0(ReentrantMapBackedComputingCache.java:55)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.WeakLazyValueHolder$1.computeValue(WeakLazyValueHolder.java:35)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.WeakLazyValueHolder.get(WeakLazyValueHolder.java:53)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:72)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getCastValue(ReentrantMapBackedComputingCache.java:78)
at org.jboss.weld.core#3.0.5.Final//org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:177)
... 12 more
mvn dependency:tree looks like this:
[INFO] com.company:app:war:1.0-SNAPSHOT
[INFO] +- org.apache.wicket:wicket-core:jar:7.10.0:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] | +- org.apache.wicket:wicket-request:jar:7.10.0:compile
[INFO] | +- org.apache.wicket:wicket-util:jar:7.10.0:compile
[INFO] | | \- commons-fileupload:commons-fileupload:jar:1.3.2:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- org.apache.wicket:wicket-extensions:jar:7.10.0:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.25:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.springframework:spring-core:jar:5.1.0.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.1.0.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:5.1.0.RELEASE:compile
[INFO] | \- org.springframework:spring-beans:jar:5.1.0.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:5.1.0.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.1.0.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.1.0.RELEASE:compile
[INFO] +- org.apache.wicket:wicket-spring:jar:7.10.0:compile
[INFO] | \- org.apache.wicket:wicket-ioc:jar:7.10.0:compile
[INFO] | +- cglib:cglib:jar:3.1:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | \- org.ow2.asm:asm-util:jar:5.0.3:compile
[INFO] | \- org.ow2.asm:asm-tree:jar:5.0.3:compile
[INFO] | \- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] +- org.apache.wicket:wicket-devutils:jar:7.10.0:compile
[INFO] +- org.springframework:spring-jdbc:jar:5.1.0.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.1.0.RELEASE:compile
[INFO] +- org.jboss.spec.javax.servlet:jboss-servlet-api_4.0_spec:jar:1.0.0.Final:compile
[INFO] +- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.8:compile
[INFO] +- com.company:wicketWebComponents:jar:2.0.0-SNAPSHOT:compile
[INFO] | \- org.apache.commons:commons-vfs2:jar:2.1:compile
[INFO] | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- com.company.marsz:MailSender:jar:1.8.1:compile
[INFO] | \- org.apache.commons:commons-email:jar:1.4:compile
[INFO] | +- com.sun.mail:javax.mail:jar:1.5.2:compile
[INFO] | \- javax.activation:activation:jar:1.1.1:compile
[INFO] +- net.bull.javamelody:javamelody-core:jar:1.74.0:compile
[INFO] | \- org.jrobin:jrobin:jar:1.5.9:compile
[INFO] +- com.company.proces:system-parameters:jar:1.8.6-SNAPSHOT:compile
[INFO] | +- redis.clients:jedis:jar:2.9.0:compile
[INFO] | | \- org.apache.commons:commons-pool2:jar:2.4.2:compile
[INFO] | +- org.springframework.data:spring-data-redis:jar:2.1.0.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-keyvalue:jar:2.1.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-oxm:jar:5.1.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-context-support:jar:5.1.0.RELEASE:compile
[INFO] | +- com.company:energetyka-coretypes:jar:1.8.1-umarsz:compile
[INFO] | \- com.company:ucore:jar:1.8.6-SNAPSHOT:compile
[INFO] +- com.company:sso-service:jar:1.8.0:compile
[INFO] | \- org.jasig.cas.client:cas-client-core:jar:3.4.1:compile
[INFO] +- com.company:appBackend:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.1.0.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.1.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:5.1.0.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjrt:jar:1.9.1:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.0:compile
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.3.0:compile
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.1:compile
[INFO] | \- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile
[INFO] +- com.company:notification-api:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- com.google.code.gson:gson:jar:2.6.2:compile
[INFO] | \- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] +- com.company:c-components:jar:1.1.1-SNAPSHOT:compile
[INFO] +- com.company.marsz:wicketWebComponents:jar:1.8-SNAPSHOT:compile
[INFO] +- com.company.marsz:ExcelReports:jar:1.8.1:compile
[INFO] | +- com.company.marsz:statistics:jar:1.8.1:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.poi:poi:jar:4.0.0:compile
[INFO] | +- org.apache.poi:poi-ooxml:jar:4.0.0:compile
[INFO] | | +- org.apache.poi:poi-ooxml-schemas:jar:4.0.0:compile
[INFO] | | | \- org.apache.xmlbeans:xmlbeans:jar:3.0.1:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.18:compile
[INFO] | | \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] | \- xerces:xercesImpl:jar:2.12.0:compile
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- org.hibernate:hibernate-core:jar:5.3.6.Final:provided
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:provided
[INFO] | +- org.javassist:javassist:jar:3.23.1-GA:provided
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.8.17:provided
[INFO] | +- antlr:antlr:jar:2.7.7:provided
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:provided
[INFO] | +- org.jboss:jandex:jar:2.0.5.Final:provided
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:provided
[INFO] | +- javax.activation:javax.activation-api:jar:1.2.0:provided
[INFO] | +- dom4j:dom4j:jar:1.6.1:provided
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:provided
[INFO] \- com.company:multitenancy:jar:1.0.0-SNAPSHOT:compile
I found help on the wildfly forums: https://developer.jboss.org/thread/276373?start=15&tstart=0
After adding this dependency it works:
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
<version>1.0.1</version>
</dependency>
I know that this error kinda implicates dependency/runtime issues yet I can't seem to find the offending dependencies. As from my stackoverflow/google research this happens if you mix jersey versions or using jax-rs 2.0 with jersey 1.0 but all my jersey dependencies are 2.22.1 and I can see in the referenced libraries that jax-rs is used in version 2.0.1.
The maven dependencies I'm using are:
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.3.7.v20160115</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.3.7.v20160115</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.3.7.v20160115</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>2.22.1</version>
</dependency>
The Java code used (if the code matters) (basically taken from an online tutorial):
ServletContextHandler context = new ServletContextHandler(
ServletContextHandler.SESSIONS);
context.setContextPath("/");
Server jettyServer = new Server(9090);
jettyServer.setHandler(context);
ServletHolder jerseyServlet = context.addServlet(
org.glassfish.jersey.servlet.ServletContainer.class, "/*");
jerseyServlet.setInitOrder(0);
// Tells the Jersey Servlet which REST service/class to load.
jerseyServlet.setInitParameter(
"jersey.config.server.provider.classnames",
EntryPoint.class.getCanonicalName());
try {
jettyServer.start();
jettyServer.join();
} catch (Exception ex) {
ex.printStackTrace();
} finally {
jettyServer.destroy();
}
Trace of mvn dependency:tree:
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # hadoopy ---
[INFO] ch.foob.mumi:hadoopy:jar:0.0
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- org.apache.hadoop:hadoop-hdfs:jar:2.7.1:compile
[INFO] | +- com.google.guava:guava:jar:11.0.2:compile
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.26:compile
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
[INFO] | +- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] | +- com.sun.jersey:jersey-server:jar:1.9:compile
[INFO] | | \- asm:asm:jar:3.1:compile
[INFO] | +- commons-cli:commons-cli:jar:1.2:compile
[INFO] | +- commons-codec:commons-codec:jar:1.4:compile
[INFO] | +- commons-io:commons-io:jar:2.4:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | +- commons-daemon:commons-daemon:jar:1.0.13:compile
[INFO] | +- log4j:log4j:jar:1.2.17:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | +- xmlenc:xmlenc:jar:0.52:compile
[INFO] | +- io.netty:netty-all:jar:4.0.23.Final:compile
[INFO] | +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
[INFO] | \- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:compile
[INFO] +- org.apache.hadoop:hadoop-common:jar:2.7.1:compile
[INFO] | +- org.apache.hadoop:hadoop-annotations:jar:2.7.1:compile
[INFO] | | \- jdk.tools:jdk.tools:jar:1.8:system
[INFO] | +- org.apache.commons:commons-math3:jar:3.1.1:compile
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] | | +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] | | \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] | +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.1.2:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.1.2:compile
[INFO] | | \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.10:compile
[INFO] | +- org.apache.avro:avro:jar:1.7.4:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | \- org.xerial.snappy:snappy-java:jar:1.0.4.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.2.4:compile
[INFO] | +- org.apache.hadoop:hadoop-auth:jar:2.7.1:compile
[INFO] | | +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
[INFO] | | | \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
[INFO] | | \- org.apache.curator:curator-framework:jar:2.7.1:compile
[INFO] | +- com.jcraft:jsch:jar:0.1.42:compile
[INFO] | +- org.apache.curator:curator-client:jar:2.7.1:compile
[INFO] | +- org.apache.curator:curator-recipes:jar:2.7.1:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] | | \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | \- org.tukaani:xz:jar:1.0:compile
[INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.22.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.22.1:compile
[INFO] | +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.1:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b31:compile
[INFO] | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b31:compile
[INFO] | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b31:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b31:compile
[INFO] | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b31:compile
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- org.glassfish.jersey.core:jersey-common:jar:2.22.1:compile
[INFO] | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.1:compile
[INFO] | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] +- org.eclipse.jetty:jetty-server:jar:9.3.7.v20160115:compile
[INFO] | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] | \- org.eclipse.jetty:jetty-io:jar:9.3.7.v20160115:compile
[INFO] +- org.eclipse.jetty:jetty-servlet:jar:9.3.7.v20160115:compile
[INFO] | \- org.eclipse.jetty:jetty-security:jar:9.3.7.v20160115:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.1:compile
[INFO] | \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.1:compile
[INFO] +- org.eclipse.jetty:jetty-http:jar:9.3.7.v20160115:compile
[INFO] | \- org.eclipse.jetty:jetty-util:jar:9.3.7.v20160115:compile
[INFO] \- org.glassfish.jersey.containers:jersey-container-jetty-http:jar:2.22.1:compile
[INFO] \- org.eclipse.jetty:jetty-continuation:jar:9.1.1.v20140108:compile