Mixing spring boot with redis - java

I'm trying to mix spring boot together with redis.
These are the dependencies:
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent/1.5.10.RELEASE
https://mvnrepository.com/artifact/org.springframework.data/spring-data-redis/2.0.4.RELEASE
However when I implement the redis beans I get an error:
java.lang.NoSuchMethodError: org.springframework.data.repository.config.RepositoryConfigurationSource.getAttribute(Ljava/lang/String;)Ljava/util/Optional;
Is it possible these 2 dependencies don't mix?
edit: added code
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
#Configuration
public class RedisConfiguration {
#Value("${redis.host}")
private String host;
#Value("${redis.port}")
private int port;
#Value("${redis.pw}")
private String password;
#Value("${redis.user}")
private String user;
#Bean
JedisConnectionFactory jedisConnectionFactory() {
System.out.println("setting up port: " + this.port);
JedisConnectionFactory jedisConFactory
= new JedisConnectionFactory();
jedisConFactory.setHostName(this.host);
jedisConFactory.setClientName(this.user);
jedisConFactory.setPort(this.port);
jedisConFactory.setPassword(this.password);
return jedisConFactory;
}
#Bean
public RedisTemplate<String, Object> redisTemplate() {
RedisTemplate<String, Object> template = new RedisTemplate<>();
template.setConnectionFactory(jedisConnectionFactory());
return template;
}
}
Pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
<type>jar</type>
</dependency>
</dependencies>
dep tree:
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:1.5.10.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.10.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.10.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:compile
[INFO] | \- org.springframework.boot:spring-boot-actuator:jar:1.5.10.RELEASE:compile
[INFO] | \- org.springframework:spring-context:jar:4.3.14.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.10.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.10.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.27:compile
[INFO] | | | \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.27:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.27:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.27:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.14.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:4.3.14.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.14.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.14.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jersey:jar:1.5.10.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:1.5.10.RELEASE:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.25.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.25.1:compile
[INFO] | | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25.1:compile
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.25.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.25.1:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.5.0-b32:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b32:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b32:compile
[INFO] | | +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b32:compile
[INFO] | | \- org.glassfish.hk2:hk2-locator:jar:2.5.0-b32:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.25.1:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.25.1:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.25.1:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-spring3:jar:2.25.1:compile
[INFO] | | +- org.glassfish.hk2:hk2:jar:2.5.0-b32:compile
[INFO] | | | +- org.glassfish.hk2:config-types:jar:2.5.0-b32:compile
[INFO] | | | +- org.glassfish.hk2:hk2-core:jar:2.5.0-b32:compile
[INFO] | | | +- org.glassfish.hk2:hk2-config:jar:2.5.0-b32:compile
[INFO] | | | +- org.glassfish.hk2:hk2-runlevel:jar:2.5.0-b32:compile
[INFO] | | | \- org.glassfish.hk2:class-model:jar:2.5.0-b32:compile
[INFO] | | | \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.5.0-b32:compile
[INFO] | | \- org.glassfish.hk2:spring-bridge:jar:2.5.0-b32:compile
[INFO] | \- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.25.1:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.25.1:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.10:compile
[INFO] | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.10:compile
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.10:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.10.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.10.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.10.RELEASE:test
[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
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:2.6.0: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.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:4.3.14.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.14.RELEASE:test
[INFO] +- com.zaxxer:HikariCP:jar:2.5.1:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.webjars:webjars-locator:jar:0.32-1:compile
[INFO] | \- org.webjars:webjars-locator-core:jar:0.32:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.9:compile
[INFO] +- org.webjars:bootstrap:jar:4.0.0:compile
[INFO] | +- org.webjars:jquery:jar:3.0.0:compile
[INFO] | \- org.webjars.npm:popper.js:jar:1.11.1:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:1.5.10.RELEASE:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.10.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.10.RELEASE:compile
[INFO] +- io.swagger:swagger-jersey2-jaxrs:jar:1.5.13:compile
[INFO] | \- org.glassfish.jersey.media:jersey-media-multipart:jar:2.25.1:compile
[INFO] | \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
[INFO] +- io.swagger:swagger-jaxrs:jar:1.5.13:compile
[INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | +- org.reflections:reflections:jar:0.9.10:compile
[INFO] | | +- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:2.0.1:compile
[INFO] | \- com.google.guava:guava:jar:20.0:compile
[INFO] +- io.swagger:swagger-models:jar:1.5.13:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] +- io.swagger:swagger-core:jar:1.5.13:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.2.1:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.10:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- io.swagger:swagger-annotations:jar:1.5.13:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.16:provided
[INFO] +- org.springframework.data:spring-data-redis:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-keyvalue:jar:1.2.10.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.13.10.RELEASE:compile
[INFO] | | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | +- org.springframework:spring-tx:jar:4.3.14.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:4.3.14.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.14.RELEASE:compile
[INFO] | \- org.springframework:spring-context-support:jar:4.3.14.RELEASE:compile
[INFO] \- redis.clients:jedis:jar:2.9.0:compile
[INFO] \- org.apache.commons:commons-pool2:jar:2.4.3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Spring Boot 1.x and Spring Data 2.x are not compatible. Stay either entirely on the 1.x line, or, upgrade to Spring Boot 2.0 which is scheduled to be released today.

Spring data redis does come with a default redis client version. Check your mvn dependency tree and see if there are multiple redis version.If yes try excluding one.

Related

Correct the classpath of your application so that it contains compatible versions of the classes Log4J2LoggingSystem and PropertiesUtil

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>

How to fix java.lang.NoSuchMethodError: org.yaml.snakeyaml.Yaml.<init>(Lorg/yaml/snakeyaml/constructor/BaseConstructor?

I have a spark spring-boot application and upgrading spring boot from 1.X to 2.1.5.Now with spring-boot 2.1.15 upgrade , I am getting snakeyaml error in application startup as:
ERROR SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.yaml.snakeyaml.Yaml.<init>(Lorg/yaml/snakeyaml/constructor/BaseConstructor;Lorg/yaml/snakeyaml/representer/Representer;Lorg/yaml/snakeyaml/DumperOptions;Lorg/yaml/snakeyaml/LoaderOptions;Lorg/yaml/snakeyaml/resolver/Resolver;)V
at org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:71)
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:162)
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:76)
at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:544)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:499)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:475)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:445)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$6(ConfigFileApplicationListener.java:427)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$7(ConfigFileApplicationListener.java:427)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:424)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:323)
at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:204)
at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:188)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:178)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:342)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
at com.capitalone.customercore.autolink.AutolinkApp.main(AutolinkApp.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
I did check the snakeyaml in dependency:tree and see org.yaml:snakeyaml:jar:1.23:compile
My dependency:tree is :
com.test.customercore:autolink-utility:jar:0.30-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.15.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.1.15.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.15.RELEASE:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:5.1.16.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.1.16.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.23:compile
[INFO] +- org.springframework:spring-expression:jar:5.3.17:compile
[INFO] [INFO] | +- com.amazonaws:aws-java-sdk-kinesisvideo:jar:1.11.511:compile
[INFO] | | \- io.netty:netty-handler:jar:4.1.50.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.50.Final:compile
[INFO] | | +- io.netty:netty-resolver:jar:4.1.50.Final:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.1.50.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.50.Final:compile
[INFO] | | \- io.netty:netty-codec:jar:4.1.50.Final:compile
[INFO] | [INFO] +- org.springframework.boot:spring-boot-starter-data-cassandra:jar:2.1.15.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.1.16.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-cassandra:jar:2.1.18.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:5.1.16.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:5.1.16.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.1.16.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.1.18.RELEASE:compile
[INFO] | +- com.datastax.cassandra:cassandra-driver-core:jar:3.6.0:compile
[INFO] | | +- com.github.jnr:jnr-ffi:jar:2.1.7:compile
[INFO] | | | +- com.github.jnr:jffi:jar:1.2.16:compile
[INFO] | | | +- com.github.jnr:jffi:jar:native:1.2.16:runtime
[INFO] | | | +- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] | | | +- org.ow2.asm:asm-commons:jar:5.0.3:compile
[INFO] | | | +- org.ow2.asm:asm-analysis:jar:5.0.3:compile
[INFO] | | | +- org.ow2.asm:asm-tree:jar:5.0.3:compile
[INFO] | | | +- org.ow2.asm:asm-util:jar:5.0.3:compile
[INFO] | | | \- com.github.jnr:jnr-x86asm:jar:1.0.2:compile
[INFO] | | \- com.github.jnr:jnr-posix:jar:3.0.44:compile
[INFO] | | \- com.github.jnr:jnr-constants:jar:0.9.9:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.15.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.1.15.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.15.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:compile
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:compile
[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:jar:1.9.16:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.16:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:compile
[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-test:jar:5.1.16.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.4:test
[INFO] +- org.springframework.boot:spring-boot-starter-log4j:jar:1.3.8.RELEASE:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.30:compile
[INFO] | +- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | \- org.slf4j:slf4j-log4j12:jar:1.7.30:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.17.1:compile
[INFO] +- com.test.api.customers:customers-relations-common:jar:1.1.28-RELEASE:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] | +- com.test.chassis.model:chassis-business-model:jar:3.1.1.RELEASE:compile
[INFO] | | +- com.test.chassis:chassis-annotations:jar:3.1.1.RELEASE:compile
[INFO] | | +- io.swagger:swagger-annotations:jar:1.5.21: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.jooq:jool-java-8:jar:0.9.13: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] | +- com.test.chassis.engine:chassis-model:jar:3.1.1.RELEASE:compile
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | +- javax.el:javax.el-api:jar:3.0.0:compile
[INFO] | | \- org.glassfish.web:el-impl:jar:2.2:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.10:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.10:compile
[INFO] | +- org.hamcrest:java-hamcrest:jar:2.0.0.0:compile
[INFO] | +- redis.clients:jedis:jar:2.9.3:compile
[INFO] | | \- org.apache.commons:commons-pool2:jar:2.6.2:compile
[INFO] | \- org.springframework.data:spring-data-redis:jar:2.1.18.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-keyvalue:jar:2.1.18.RELEASE:compile
[INFO] | +- org.springframework:spring-oxm:jar:5.1.16.RELEASE:compile
[INFO] | \- org.springframework:spring-context-support:jar:5.1.16.RELEASE:compile
[INFO] +- org.hibernate.validator:hibernate-validator:jar:6.1.5.Final:compile
[INFO] | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.3.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] +- org.apache.spark:spark-sql_2.11:jar:2.4.0:compile
[INFO] | +- com.univocity:univocity-parsers:jar:2.7.3:compile
[INFO] | +- org.apache.spark:spark-sketch_2.11:jar:2.4.0:compile
[INFO] | +- org.apache.spark:spark-catalyst_2.11:jar:2.4.0:compile
[INFO] | | +- org.scala-lang.modules:scala-parser-combinators_2.11:jar:1.1.0:compile
[INFO] | | +- org.codehaus.janino:janino:jar:3.0.16:compile
[INFO] | | +- org.codehaus.janino:commons-compiler:jar:3.0.16:compile
[INFO] | | \- org.antlr:antlr4-runtime:jar:4.7:compile
[INFO] | +- org.apache.spark:spark-tags_2.11:jar:2.4.0:compile
[INFO] | +- org.apache.orc:orc-core:jar:nohive:1.5.2:compile
[INFO] | | +- org.apache.orc:orc-shims:jar:1.5.2:compile
[INFO] | | \- io.airlift:aircompressor:jar:0.10:compile
[INFO] | +- org.apache.orc:orc-mapreduce:jar:nohive:1.5.2:compile
[INFO] | +- org.apache.parquet:parquet-column:jar:1.10.0:compile
[INFO] | | +- org.apache.parquet:parquet-common:jar:1.10.0:compile
[INFO] | | \- org.apache.parquet:parquet-encoding:jar:1.10.0:compile
[INFO] | +- org.apache.parquet:parquet-hadoop:jar:1.10.0:compile
[INFO] | | +- org.apache.parquet:parquet-format:jar:2.4.0:compile
[INFO] | | +- org.apache.parquet:parquet-jackson:jar:1.10.0:compile
[INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | +- org.apache.arrow:arrow-vector:jar:0.10.0:compile
[INFO] | | +- org.apache.arrow:arrow-format:jar:0.10.0:compile
[INFO] | | +- org.apache.arrow:arrow-memory:jar:0.10.0:compile
[INFO] | | +- com.carrotsearch:hppc:jar:0.7.2:compile
[INFO] | | \- com.vlkan:flatbuffers:jar:1.2.0-3f79e055:compile
[INFO] | +- org.apache.xbean:xbean-asm6-shaded:jar:4.8:compile
[INFO] | \- org.spark-project.spark:unused:jar:1.0.0:compile
[INFO] +- org.apache.spark:spark-core_2.11:jar:2.4.1:compile
[INFO] | +- com.thoughtworks.paranamer:paranamer:jar:2.8:compile
[INFO] | +- org.apache.avro:avro:jar:1.8.2:compile
[INFO] | | \- org.tukaani:xz:jar:1.5:compile
[INFO] | +- org.apache.avro:avro-mapred:jar:hadoop2:1.8.2:compile
[INFO] | | \- org.apache.avro:avro-ipc:jar:1.8.2:compile
[INFO] | +- com.twitter:chill_2.11:jar:0.9.3:compile
[INFO] | | \- com.esotericsoftware:kryo-shaded:jar:4.0.2:compile
[INFO] | | \- com.esotericsoftware:minlog:jar:1.3.0:compile
[INFO] | +- com.twitter:chill-java:jar:0.9.3:compile
[INFO] | +- org.apache.spark:spark-launcher_2.11:jar:2.4.1:compile
[INFO] | +- org.apache.spark:spark-kvstore_2.11:jar:2.4.1:compile
[INFO] | +- org.apache.spark:spark-network-shuffle_2.11:jar:2.4.1:compile
[INFO] | +- org.apache.spark:spark-unsafe_2.11:jar:2.4.1:compile
[INFO] | +- javax.activation:activation:jar:1.1.1:compile
[INFO] | +- org.apache.curator:curator-recipes:jar:2.6.0:compile
[INFO] | | \- org.apache.curator:curator-framework:jar:2.6.0:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] | +- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] | +- org.apache.commons:commons-math3:jar:3.4.1:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- com.ning:compress-lzf:jar:1.0.3:compile
[INFO] | +- org.xerial.snappy:snappy-java:jar:1.1.7.1:compile
[INFO] | +- org.lz4:lz4-java:jar:1.4.0:compile
[INFO] | +- com.github.luben:zstd-jni:jar:1.3.2-2:compile
[INFO] | +- org.roaringbitmap:RoaringBitmap:jar:0.5.11:compile
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.11.12:compile
[INFO] | +- org.json4s:json4s-jackson_2.11:jar:3.5.3:compile
[INFO] | | \- org.json4s:json4s-core_2.11:jar:3.5.3:compile
[INFO] | | +- org.json4s:json4s-ast_2.11:jar:3.5.3:compile
[INFO] | | +- org.json4s:json4s-scalap_2.11:jar:3.5.3:compile
[INFO] | | \- org.scala-lang.modules:scala-xml_2.11:jar:1.0.6:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.27:compile
[INFO] | | \- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b42:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.27:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.27:compile
[INFO] | | \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.27:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.27:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.27:compile
[INFO] | +- com.clearspring.analytics:stream:jar:2.7.0:compile
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:3.2.2:compile
[INFO] | +- io.dropwizard.metrics:metrics-jvm:jar:4.0.7:compile
[INFO] | +- io.dropwizard.metrics:metrics-json:jar:4.0.7:compile
[INFO] | +- io.dropwizard.metrics:metrics-graphite:jar:4.0.7:compile
[INFO] | | \- com.rabbitmq:amqp-client:jar:5.4.3:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.10.4:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-scala_2.11:jar:2.9.10:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-paranamer:jar:2.9.10:compile
[INFO] | +- org.apache.ivy:ivy:jar:2.4.0:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- net.razorvine:pyrolite:jar:4.13:compile
[INFO] | +- net.sf.py4j:py4j:jar:0.10.7:compile
[INFO] | \- org.apache.commons:commons-crypto:jar:1.0.0:compile
[INFO] +- org.apache.spark:spark-network-common_2.11:jar:2.4.6:compile
[INFO] | +- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.10:compile
[INFO] +- commons-codec:commons-codec:jar:1.13:compile
[INFO] +- org.apache.logging.log4j:log4j-1.2-api:jar:2.17.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- com.datastax.spark:spark-cassandra-connector-unshaded_2.11:jar:2.4.0:compile
[INFO] | +- org.joda:joda-convert:jar:1.2:compile
[INFO] | +- joda-time:joda-time:jar:2.10.6:compile
[INFO] | +- io.netty:netty-all:jar:4.1.50.Final:compile
[INFO] | +- com.twitter:jsr166e:jar:1.1.0:compile
[INFO] | \- org.scala-lang:scala-reflect:jar:2.11.12:compile
[INFO] +- org.cassandraunit:cassandra-unit:jar:3.1.1.0:test
[INFO] | +- org.apache.cassandra:cassandra-all:jar:3.9:test
[INFO] | | +- net.jpountz.lz4:lz4:jar:1.3.0:test
[INFO] | | +- commons-cli:commons-cli:jar:1.1:compile
[INFO] | | +- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:test
[INFO] | | +- org.antlr:antlr:jar:3.5.2:test
[INFO] | | | \- org.antlr:ST4:jar:4.0.8:test
[INFO] | | +- org.antlr:antlr-runtime:jar:3.5.2:test
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:test
[INFO] | | +- com.googlecode.json-simple:json-simple:jar:1.1:test
[INFO] | | +- com.boundary:high-scale-lib:jar:1.0.6:test
[INFO] | | +- org.mindrot:jbcrypt:jar:0.3m:test
[INFO] | | +- com.addthis.metrics:reporter-config3:jar:3.0.0:test
[INFO] | | | \- com.addthis.metrics:reporter-config-base:jar:3.0.0:test
[INFO] | | +- com.thinkaurelius.thrift:thrift-server:jar:0.3.7:test
[INFO] | | | \- com.lmax:disruptor:jar:3.0.1:test
[INFO] | | +- org.apache.thrift:libthrift:jar:0.9.2:test
[INFO] | | +- org.apache.cassandra:cassandra-thrift:jar:3.9:test
[INFO] | | | +- de.jflex:jflex:jar:1.6.0:test
[INFO] | | | | \- org.apache.ant:ant:jar:1.7.0:test
[INFO] | | | | \- org.apache.ant:ant-launcher:jar:1.7.0:test
[INFO] | | | +- net.mintern:primitive:jar:1.0:test
[INFO] | | | +- com.github.rholder:snowball-stemmer:jar:1.3.0.581.1:test
[INFO] | | | \- com.googlecode.concurrent-trees:concurrent-trees:jar:2.4.0:test
[INFO] | | +- net.java.dev.jna:jna:jar:4.5.2:test
[INFO] | | +- com.github.jbellis:jamm:jar:0.3.0:test
[INFO] | | +- org.fusesource:sigar:jar:1.6.4:test
[INFO] | | +- org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:test
[INFO] | | +- org.caffinitas.ohc:ohc-core:jar:0.4.3:test
[INFO] | | \- com.github.ben-manes.caffeine:caffeine:jar:2.6.2:test
[INFO] | \- com.google.guava:guava:jar:18.0:compile
[INFO] +- io.netty:netty:jar:3.10.6.Final:compile
[INFO] +- org.apache.hadoop:hadoop-client:jar:3.3.2:compile
[INFO] | +- org.apache.hadoop:hadoop-common:jar:3.3.2:compile
[INFO] | | +- org.apache.hadoop.thirdparty:hadoop-shaded-protobuf_3_7:jar:1.1.1:compile
[INFO] | | +- org.apache.hadoop.thirdparty:hadoop-shaded-guava:jar:1.1.1:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] | | +- commons-io:commons-io:jar:2.8.0:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | +- jakarta.activation:jakarta.activation-api:jar:1.2.1:runtime
[INFO] | | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | | +- com.sun.jersey:jersey-servlet:jar:1.19:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | +- org.apache.commons:commons-configuration2:jar:2.1.1:compile
[INFO] | | +- org.apache.commons:commons-text:jar:1.4:compile
[INFO] | | +- com.google.re2j:re2j:jar:1.1:compile
[INFO] | | +- com.google.protobuf:protobuf-java:jar:2.5.0:compile
[INFO] | | +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] | | +- org.apache.hadoop:hadoop-auth:jar:3.3.2:compile
[INFO] | | | +- com.nimbusds:nimbus-jose-jwt:jar:9.8.1:compile
[INFO] | | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | | \- org.apache.kerby:kerb-simplekdc:jar:1.0.1:compile
[INFO] | | | +- org.apache.kerby:kerb-client:jar:1.0.1:compile
[INFO] | | | | +- org.apache.kerby:kerby-config:jar:1.0.1:compile
[INFO] | | | | +- org.apache.kerby:kerb-common:jar:1.0.1:compile
[INFO] | | | | | \- org.apache.kerby:kerb-crypto:jar:1.0.1:compile
[INFO] | | | | +- org.apache.kerby:kerb-util:jar:1.0.1:compile
[INFO] | | | | \- org.apache.kerby:token-provider:jar:1.0.1:compile
[INFO] | | | \- org.apache.kerby:kerb-admin:jar:1.0.1:compile
[INFO] | | | +- org.apache.kerby:kerb-server:jar:1.0.1:compile
[INFO] | | | | \- org.apache.kerby:kerb-identity:jar:1.0.1:compile
[INFO] | | | \- org.apache.kerby:kerby-xdr:jar:1.0.1:compile
[INFO] | | +- org.apache.curator:curator-client:jar:4.2.0:compile
[INFO] | | +- org.apache.commons:commons-compress:jar:1.21:compile
[INFO] | | +- org.apache.kerby:kerb-core:jar:1.0.1:compile
[INFO] | | | \- org.apache.kerby:kerby-pkix:jar:1.0.1:compile
[INFO] | | | +- org.apache.kerby:kerby-asn1:jar:1.0.1:compile
[INFO] | | | \- org.apache.kerby:kerby-util:jar:1.0.1:compile
[INFO] | | +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] | | +- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] | | \- dnsjava:dnsjava:jar:2.1.7:compile
[INFO] | +- org.apache.hadoop:hadoop-hdfs-client:jar:3.3.2:compile
[INFO] | | \- com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO] | | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] | +- org.apache.hadoop:hadoop-yarn-api:jar:3.3.2:compile
[INFO] | +- org.apache.hadoop:hadoop-yarn-client:jar:3.3.2:compile
[INFO] | | \- org.jline:jline:jar:3.9.0:compile
[INFO] | \- org.apache.hadoop:hadoop-annotations:jar:3.3.2:compile
[INFO] \- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] --------------------------------------------------------------------
how do I resolve snakeyaml error?
So, you had been using Snakeyaml with an earlier Spring Boot version, but with a newer Spring Boot version, Snakeyaml stopped working. This very much seems to be a version incompatibility issue.
Here: https://search.maven.org/artifact/org.springframework.boot/spring-boot-starter/2.1.15.RELEASE/jar
we can see this structure:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starters</artifactId>
<version>2.1.15.RELEASE</version>
</parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.1.15.RELEASE</version>
<name>Spring Boot Starter</name>
<description>Core starter, including auto-configuration support, logging and YAML</description>
<url>https://projects.spring.io/spring-boot/#/spring-boot-parent/spring-boot-starters/spring-boot-starter</url>
<organization>
<name>Pivotal Software, Inc.</name>
<url>https://spring.io</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<developers>
<developer>
<name>Pivotal</name>
<email>info#pivotal.io</email>
<organization>Pivotal Software, Inc.</organization>
<organizationUrl>https://www.spring.io</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/spring-projects/spring-boot.git</connection>
<developerConnection>scm:git:ssh://git#github.com/spring-projects/spring-boot.git</developerConnection>
<url>https://github.com/spring-projects/spring-boot</url>
</scm>
<issueManagement>
<system>Github</system>
<url>https://github.com/spring-projects/spring-boot/issues</url>
</issueManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.1.15.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.1.15.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<version>2.1.15.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.1.16.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
where the interesting part from our perspective is:
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
so, you will likely need to ensure that your Snakeyaml version is 1.23.
We can create a software solution for the above case by separating the above functionalities in three objects as below. 1) The Snake Box Factory The factory will produce the Snake Boxes. The factory could be

How can I get rid of xml-apis library in Maven project dynamically?

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

Package 'javax.jms' is declared in module with an invalid name ('geronimo.jms.2.0.spec')

At this moment I'm refactoring an app to use java's modular system and
I'm stuck with an awkward situation while using org.apache.activemq:artemis-jms-client:jar:2.16.0:compile. I'm getting an error
Package 'javax.jms' is declared in module with an invalid name ('geronimo.jms.2.0.spec')
Is there any way to bypass this error while using modules?
NOTE: I'm using JAVA 11; Maven; IntelliJ IDEA 2020.3.1 (Community Edition)
mvn dependency:tree
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.4.0:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.4.0:compile
[INFO] | | \- org.springframework:spring-context:jar:5.3.1:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.0:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | +- org.springframework:spring-core:jar:5.3.1:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.1:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.4.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.4.0:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.3:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.11.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.4.0:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.39:compile
[INFO] | | +- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.39:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.1:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.1:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.1:compile
[INFO] | \- org.springframework:spring-expression:jar:5.3.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] +- com.sun.xml.bind:jaxb-impl:jar:2.3.3:runtime
[INFO] | \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- jakarta.xml.ws:jakarta.xml.ws-api:jar:2.3.3:compile
[INFO] | +- jakarta.xml.soap:jakarta.xml.soap-api:jar:1.4.2:compile
[INFO] | \- jakarta.jws:jakarta.jws-api:jar:2.1.0:compile
[INFO] +- com.sun.xml.ws:jaxws-rt:jar:2.3.3:compile
[INFO] | +- com.sun.xml.ws:policy:jar:2.7.10:compile
[INFO] | +- org.glassfish.ha:ha-api:jar:3.1.12:compile
[INFO] | +- org.glassfish.external:management-api:jar:3.2.2:compile
[INFO] | +- org.glassfish.gmbal:gmbal:jar:4.0.1:compile
[INFO] | +- org.glassfish.pfl:pfl-tf:jar:4.1.0:compile
[INFO] | +- org.glassfish.pfl:pfl-basic:jar:4.1.0:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8.3:compile
[INFO] | +- com.sun.xml.stream.buffer:streambuffer:jar:1.5.9:compile
[INFO] | +- org.jvnet.mimepull:mimepull:jar:1.9.13:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.18:compile
[INFO] | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.2:compile
[INFO] | +- com.fasterxml.woodstox:woodstox-core:jar:5.1.0:compile
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:4.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-artemis:jar:2.4.0:compile
[INFO] | +- jakarta.jms:jakarta.jms-api:jar:2.0.3:compile
[INFO] | +- jakarta.json:jakarta.json-api:jar:1.1.6:compile
[INFO] | \- org.springframework:spring-jms:jar:5.3.1:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.3.1:compile
[INFO] | \- org.springframework:spring-tx:jar:5.3.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.4.0:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.4.0:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.0: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.assertj:assertj-core:jar:3.18.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.0:test
[INFO] | +- org.mockito:mockito-core:jar:3.6.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.18:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.18:test
[INFO] | | \- org.objenesis:objenesis:jar:3.1:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.6.0: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-test:jar:5.3.1:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test
[INFO] +- org.apache.cxf:cxf-rt-features-logging:jar:3.3.1:compile
[INFO] | +- org.apache.cxf:cxf-core:jar:3.3.1: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.apache.ws.xmlschema:xmlschema-core:jar:2.2.4:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-xjc:jar:2.3.3:compile
[INFO] | | +- org.glassfish.jaxb:xsom:jar:2.3.3:compile
[INFO] | | | \- com.sun.xml.bind.external:relaxng-datatype:jar:2.3.3-b02:compile
[INFO] | | +- org.glassfish.jaxb:codemodel:jar:2.3.3:compile
[INFO] | | +- com.sun.xml.bind.external:rngom:jar:2.3.3:compile
[INFO] | | +- com.sun.xml.dtd-parser:dtd-parser:jar:1.4.3:compile
[INFO] | | \- com.sun.istack:istack-commons-tools:jar:3.0.11:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- javax.xml.ws:jaxws-api:jar:2.3.1:compile
[INFO] | | \- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
[INFO] | +- com.sun.activation:javax.activation:jar:1.2.0:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.3:compile
[INFO] | +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] | \- org.jboss.spec.javax.rmi:jboss-rmi-api_1.0_spec:jar:1.0.6.Final:compile
[INFO] +- com.mytest:tu:jar:0.0.1-SNAPSHOT:compile
[INFO] | \- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:2.0.0.CR1:compile
[INFO] +- org.apache.cxf:cxf-spring-boot-starter-jaxws:jar:3.4.2:compile
[INFO] | +- org.apache.cxf:cxf-spring-boot-autoconfigure:jar:3.4.2:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.4.2:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.4.2:compile
[INFO] | | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | | +- org.ow2.asm:asm:jar:9.0:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.4.2:compile
[INFO] | | | +- org.apache.cxf:cxf-rt-wsdl:jar:3.4.2:compile
[INFO] | | | | \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | | | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.4.2:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.4.2:compile
[INFO] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.4.2:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:3.4.2:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-policy:jar:3.4.2:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.1.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-features-metrics:jar:3.4.2:compile
[INFO] | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-validation:jar:2.4.0:compile
[INFO] | \- org.hibernate.validator:hibernate-validator:jar:6.1.6.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] +- org.apache.activemq:artemis-spring-integration:jar:2.16.0:compile
[INFO] | +- org.apache.activemq:artemis-server:jar:2.15.0:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | | +- org.jboss.logmanager:jboss-logmanager:jar:2.1.10.Final:compile
[INFO] | | | \- org.wildfly.common:wildfly-common:jar:1.5.1.Final:compile
[INFO] | | +- org.apache.activemq:artemis-journal:jar:2.15.0:compile
[INFO] | | +- org.apache.activemq:artemis-jdbc-store:jar:2.15.0:compile
[INFO] | | +- org.apache.activemq:activemq-artemis-native:jar:1.0.2:compile
[INFO] | | +- org.jctools:jctools-core:jar:2.1.2:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.54.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.54.Final:compile
[INFO] | | | \- io.netty:netty-transport-native-unix-common:jar:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.54.Final:compile
[INFO] | | +- io.netty:netty-codec:jar:4.1.54.Final:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | +- org.apache.commons:commons-configuration2:jar:2.7:compile
[INFO] | | | +- org.apache.commons:commons-lang3:jar:3.11:compile
[INFO] | | | \- org.apache.commons:commons-text:jar:1.8:compile
[INFO] | | +- io.micrometer:micrometer-core:jar:1.6.1:compile
[INFO] | | | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | | | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] | | \- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.apache.activemq:artemis-jms-server:jar:2.15.0:compile
[INFO] | | \- org.apache.activemq:artemis-service-extensions:jar:2.15.0:compile
[INFO] | \- org.springframework:spring-beans:jar:5.3.1:compile
[INFO] +- org.apache.activemq:artemis-jms-client:jar:2.16.0:compile
[INFO] | +- org.apache.activemq:artemis-core-client:jar:2.15.0:compile
[INFO] | | +- org.jgroups:jgroups:jar:3.6.13.Final:compile
[INFO] | | +- org.apache.johnzon:johnzon-core:jar:1.2.8:compile
[INFO] | | +- io.netty:netty-handler-proxy:jar:4.1.54.Final:compile
[INFO] | | \- io.netty:netty-codec-socks:jar:4.1.54.Final:compile
[INFO] | +- org.apache.activemq:artemis-commons:jar:2.15.0:compile
[INFO] | +- org.apache.activemq:artemis-selector:jar:2.15.0:compile
[INFO] | \- org.apache.geronimo.specs:geronimo-jms_2.0_spec:jar:1.0-alpha-2:compile
[INFO] +- org.apache.cxf.xjc-utils:cxf-xjc-runtime:jar:3.3.1:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.13.3:compile
[INFO] \- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.13.3:provided
In your dependency declaration for org.apache.activemq:artemis-jms-client you can exclude org.apache.geronimo.specs:geronimo-jms_2.0_spec, e.g.:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<version>2.16.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
Then explicitly include another JMS API, e.g.:
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>2.0.3</version>
</dependency>

CXFServlet throws java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;

I'm using Java 11, Spring Boot 2.1.1 and Apache CXF 3.2.7 to expose a SOAP web service that imports an XSD schema. In the WSDL it shows like:
<wsdl:import location="http://localhost:9000/endpoint/ws?wsdl=WS_endpointSoapPort.wsdl" namespace="http://test.com"> </wsdl:import>
When I send a query it fails with the following stack:
2018-12-31 12:05:54,908 ERROR se.[Tomcat].[localhost].[/].[CXFServlet]: 175 - Servlet.service() for servlet [CXFServlet] in context with path [] threw exception [Servlet execution threw an exception] with root cause
java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Lorg/codehaus/stax2/ri/EmptyIterator;
Any thoughts?
I had a conflict on the org.codehaus.woodstox:stax2-api which was included in version 3.1.4 within org.apache.cxf:cxf-core and in version 4.1 within com.sun.xml.ws:rt. I solved the conflict by removing the library using Maven excludes:
<exclusions>
<exclusion>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId><!-- 4.1 conflicts with 3.1.4 from apache cxf-spring-boot-starter-jaxws-->
</exclusion>
</exclusions>
After research in deeply, I found the following JIRA that mentions a problem with Stax2 version. BTW the ticket said that it resolves with the version that I'm using.
In the end, I fixed upgrading to woodstox-core-5.2.0. In fact, the library mentions a similar problem that was solved in that version. Details here.
My current mvn dependency:tree is:
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.1.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:5.1.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.1.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.1:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:5.1.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.1.3.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.23:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.1.1.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.7:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.7:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.7:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.7:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.7:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.1.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.13:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.13:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.13:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.13.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] | +- org.springframework:spring-web:jar:5.1.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.1.3.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.1.3.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.1.3.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.1.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.1.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.1.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.1.1.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.1.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] | +- 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:jar:1.9.5:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.5: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-test:jar:5.1.3.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] +- org.apache.cxf:cxf-spring-boot-starter-jaxws:jar:3.2.7:compile
[INFO] | +- org.apache.cxf:cxf-spring-boot-autoconfigure:jar:3.2.7:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.2.7:compile
[INFO] | | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | | +- org.ow2.asm:asm:jar:6.2:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.2.7:compile
[INFO] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.2.7:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:3.2.7:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-policy:jar:3.2.7:compile
[INFO] | \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] +- com.fasterxml.woodstox:woodstox-core:jar:5.2.0:compile
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:4.1:compile
[INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:3.2.7:compile
[INFO] | \- org.apache.cxf:cxf-core:jar:3.2.7:compile
[INFO] | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.3:compile
[INFO] +- org.apache.cxf:cxf-rt-ws-security:jar:3.2.7:compile
[INFO] | +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.2.7:compile
[INFO] | | +- org.apache.cxf:cxf-rt-wsdl:jar:3.2.7:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.2.7:compile
[INFO] | +- org.apache.cxf:cxf-rt-security-saml:jar:3.2.7:compile
[INFO] | | \- org.apache.cxf:cxf-rt-security:jar:3.2.7:compile
[INFO] | +- net.sf.ehcache:ehcache:jar:2.10.6:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.2:compile
[INFO] | | \- org.apache.wss4j:wss4j-ws-security-common:jar:2.2.2:compile
[INFO] | | +- org.apache.santuario:xmlsec:jar:2.1.2:compile
[INFO] | | | \- commons-codec:commons-codec:jar:1.11:compile
[INFO] | | +- org.opensaml:opensaml-saml-impl:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-profile-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-core:jar:3.3.0:compile
[INFO] | | | | \- io.dropwizard.metrics:metrics-core:jar:4.0.3:compile
[INFO] | | | +- org.opensaml:opensaml-saml-api:jar:3.3.0:compile
[INFO] | | | | +- org.opensaml:opensaml-xmlsec-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-soap-api:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-security-impl:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-security-api:jar:3.3.0:compile
[INFO] | | | | +- org.cryptacular:cryptacular:jar:1.1.1:compile
[INFO] | | | | \- org.bouncycastle:bcprov-jdk15on:jar:1.54:compile
[INFO] | | | +- org.opensaml:opensaml-xmlsec-impl:jar:3.3.0:compile
[INFO] | | | \- net.shibboleth.utilities:java-support:jar:7.3.0:compile
[INFO] | | | +- com.google.guava:guava:jar:19.0:compile
[INFO] | | | \- joda-time:joda-time:jar:2.10.1:compile
[INFO] | | +- org.opensaml:opensaml-xacml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-api:jar:3.3.0:compile
[INFO] | | +- org.opensaml:opensaml-xacml-saml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-saml-api:jar:3.3.0:compile
[INFO] | | +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] | | \- org.apache.geronimo.javamail:geronimo-javamail_1.4_mail:jar:1.8.4:compile
[INFO] | +- org.apache.wss4j:wss4j-policy:jar:2.2.2:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.1.1: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.apache.wss4j:wss4j-ws-security-stax:jar:2.2.2:compile
[INFO] | | \- org.apache.wss4j:wss4j-bindings:jar:2.2.2:compile
[INFO] | \- org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.2.2:compile
[INFO] +- org.apache.cxf:cxf-rt-features-logging:jar:3.2.7:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.4.0-b180830.0438:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.4.0-b180830.0438:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- com.sun.xml.ws:jaxws-rt:pom:2.3.1:compile
[INFO] | +- javax.xml.ws:jaxws-api:jar:2.3.1:compile
[INFO] | +- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
[INFO] | +- javax.jws:javax.jws-api:jar:1.1:compile
[INFO] | +- com.sun.xml.ws:policy:jar:2.7.5:compile
[INFO] | | \- com.sun.activation:javax.activation:jar:1.2.0:compile
[INFO] | +- org.glassfish.gmbal:gmbal-api-only:jar:3.1.0-b001:compile
[INFO] | | \- org.glassfish.external:management-api:jar:3.0.0-b012:compile
[INFO] | +- com.sun.xml.stream.buffer:streambuffer:jar:1.5.6:compile
[INFO] | +- org.jvnet.mimepull:mimepull:jar:1.9.10:compile
[INFO] | +- org.glassfish.ha:ha-api:jar:3.1.9:compile
[INFO] | \- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.0:compile
[INFO] \- com.sun.xml.ws:rt:jar:2.3.1:compile
I run into the same problem and upgrading to CXF 3.2.7 or later fixed the issue for me.
The key is likely in your mvn:dependency-tree output. In my case:
[INFO] \- org.apache.cxf:cxf-rt-ws-security:jar:3.3.6:compile
[INFO] +- org.apache.cxf:cxf-core:jar:3.3.6:compile
[INFO] | \- com.fasterxml.woodstox:woodstox-core:jar:5.3.0:compile (version managed from 5.0.3)
[INFO] | \- org.codehaus.woodstox:stax2-api:jar:4.2:compile
[INFO] \- org.apache.wss4j:wss4j-policy:jar:2.2.5:compile
[INFO] \- org.apache.neethi:neethi:jar:3.1.1:compile
[INFO] \- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] \- (org.codehaus.woodstox:stax2-api:jar:3.1.4:compile - omitted for conflict with 4.2)
org.apache.cxf:cxf-rt-ws-security:jar:3.3.6 leads to both version 3.1.4 and version 4.2 of stax2-api because of the very much outdated woodstox-core-asl dependency (from 2014). I will have to see if I can get rid of this, because it leads to the NoSuchMethodFoundError described above.
the problem is in new version of stax2-api new methods added. you can solve the problem by adding new version of the stax2-api. in my case adding
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>4.2.1</version>
</dependency>
solved the problem.
This is the "jar hell problem".
You should use the exclusions clause that was mentioned Julien Kronegg.
Sorry for the previous answer that I have deleted.

Categories