I'm trying to use spring boot keycloak client and admin into microservice contains spring cloud,
I get this error when I want to create a user from keycloak admin api
Thanks for you support
error :
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.ws.rs.core.UriBuilder.resolveTemplates(Ljava/util/Map;)Ljavax/ws/rs/core/UriBuilder;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:503)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.keycloak.adapters.springsecurity.filter.KeycloakAuthenticatedActionsFilter.doFilter(KeycloakAuthenticatedActionsFilter.java:57)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.keycloak.adapters.springsecurity.filter.KeycloakSecurityContextRequestFilter.doFilter(KeycloakSecurityContextRequestFilter.java:61)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.keycloak.adapters.springsecurity.filter.KeycloakPreAuthActionsFilter.doFilter(KeycloakPreAuthActionsFilter.java:96)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)
at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)
/* source */
private RealmResource getRealmResource() {
this.keycloak = Keycloak.getInstance(
serverURL,
realmkeycloak,
usernamekeycloak,
passwordKeycloak,
clientIdkeycloak);
return keycloak.realm(globalRealm);
}
Maven Tree:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # onboardingms ---
[INFO] com.xxxxxx:onboardingms:jar:0.0.1-SNAPSHOT
[INFO] +- com.xxxxxx:commons:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- io.github.jhipster:jhipster-framework:jar:3.4.0:compile
[INFO] | | \- org.springframework:spring-context-support:jar:5.2.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.2.3.RELEASE:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-cache:jar:2.2.4.RELEASE:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:jar:2.10.2:compile
[INFO] | | \- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-hppc:jar:2.10.2:compile
[INFO] | | \- com.carrotsearch:hppc:jar:0.8.1:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.2:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.10.2:compile
[INFO] | +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] | | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | | +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] | | +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] | | +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] | | +- com.google.guava:guava:jar:28.2-jre:compile
[INFO] | | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | | | +- org.checkerframework:checker-qual:jar:2.10.0:compile
[INFO] | | | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] | | | \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | | \- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | +- io.springfox:springfox-bean-validators:jar:2.9.2:compile
[INFO] | +- com.zaxxer:HikariCP:jar:3.4.2:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] | +- javax.cache:cache-api:jar:1.1.1:compile
[INFO] | +- mysql:mysql-connector-java:jar:8.0.19:compile
[INFO] | | \- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] | +- org.ehcache:ehcache:jar:3.8.1:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile
[INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.2:compile
[INFO] | | +- com.sun.istack:istack-commons-runtime:jar:3.0.8:compile
[INFO] | | +- org.jvnet.staxex:stax-ex:jar:1.8.1:compile
[INFO] | | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.16:compile
[INFO] | +- org.hibernate:hibernate-jcache:jar:5.4.10.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.4.10.Final:compile
[INFO] | | +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] | | +- org.javassist:javassist:jar:3.24.0-GA:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.6:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:compile
[INFO] | | +- org.jboss:jandex:jar:2.1.1.Final:compile
[INFO] | | +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.0.Final:compile
[INFO] | | \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.18.Final:compile
[INFO] | | \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | +- org.liquibase:liquibase-core:jar:3.8.5:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:6.3:compile
[INFO] | +- org.mapstruct:mapstruct:jar:1.3.1.Final:compile
[INFO] | +- org.springframework.boot:spring-boot-loader-tools:jar:2.2.4.RELEASE:compile
[INFO] | | \- org.apache.commons:commons-compress:jar:1.19:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-actuator:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.2.4.RELEASE:compile
[INFO] | | | \- org.springframework.boot:spring-boot-actuator:jar:2.2.4.RELEASE:compile
[INFO] | | \- io.micrometer:micrometer-core:jar:1.3.3:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.11:compile
[INFO] | | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.2.3.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.5:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.2.4.RELEASE:compile
[INFO] | | | \- org.springframework:spring-jdbc:jar:5.2.3.RELEASE:compile
[INFO] | | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] | | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile
[INFO] | | +- org.springframework.data:spring-data-jpa:jar:2.2.4.RELEASE:compile
[INFO] | | | +- org.springframework:spring-orm:jar:5.2.3.RELEASE:compile
[INFO] | | | \- org.springframework:spring-tx:jar:5.2.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-aspects:jar:5.2.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.4.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.12.1:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.12.1:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-mail:jar:2.2.4.RELEASE:compile
[INFO] | | \- com.sun.mail:jakarta.mail:jar:1.6.4:compile
[INFO] | | \- com.sun.activation:jakarta.activation:jar:1.2.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-security:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework.security:spring-security-config:jar:5.2.1.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-web:jar:5.2.1.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.2.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.11.RELEASE:compile
[INFO] | | | \- org.thymeleaf:thymeleaf:jar:3.0.11.RELEASE:compile
[INFO] | | | +- org.attoparser:attoparser:jar:2.0.5.RELEASE:compile
[INFO] | | | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] | | \- org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-json:jar:2.2.4.RELEASE:compile
[INFO] | | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.2:compile
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.2:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-validation:jar:2.2.4.RELEASE:compile
[INFO] | | | \- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | | +- org.springframework:spring-web:jar:5.2.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:5.2.3.RELEASE:compile
[INFO] | +- org.zalando:problem-spring-web:jar:0.25.2:compile
[INFO] | | +- org.zalando:problem-violations:jar:0.25.2:compile
[INFO] | | +- org.zalando:problem-spring-common:jar:0.25.2:compile
[INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | | +- org.zalando:problem:jar:0.23.0:compile
[INFO] | | +- org.zalando:jackson-datatype-problem:jar:0.23.0:compile
[INFO] | | \- org.zalando:faux-pas:jar:0.8.0:compile
[INFO] | +- io.jsonwebtoken:jjwt-api:jar:0.10.7:compile
[INFO] | +- io.jsonwebtoken:jjwt-impl:jar:0.10.7:runtime
[INFO] | +- io.jsonwebtoken:jjwt-jackson:jar:0.10.7:runtime
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:2.2.1.RELEASE:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:5.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-commons:jar:2.2.1.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.9.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.2.1.RELEASE:compile
[INFO] | | | \- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.2.1.RELEASE:compile
[INFO] | | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | | \- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | +- com.netflix.ribbon:ribbon:jar:2.3.0:compile
[INFO] | | | +- com.netflix.ribbon:ribbon-transport:jar:2.3.0:runtime
[INFO] | | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | | \- io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | | \- io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.3.0:compile
[INFO] | | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | +- com.netflix.ribbon:ribbon-httpclient:jar:2.3.0:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient:jar:4.5.10:compile
[INFO] | | | | +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] | | | | \- commons-codec:commons-codec:jar:1.13:compile
[INFO] | | | +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] | | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] | | | +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] | | | \- com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:runtime
[INFO] | | +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.3.0:compile
[INFO] | | | \- com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] | | \- io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-hystrix:jar:2.2.1.RELEASE:compile
[INFO] | | +- com.netflix.hystrix:hystrix-core:jar:1.5.18:compile
[INFO] | | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.18:compile
[INFO] | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.18:compile
[INFO] | | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.18:compile
[INFO] | | | \- org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | \- io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-netflix-eureka-client:jar:2.2.1.RELEASE:compile
[INFO] | | +- com.netflix.eureka:eureka-client:jar:1.9.13:compile
[INFO] | | | +- org.codehaus.jettison:jettison:jar:1.3.7:runtime
[INFO] | | | | \- stax:stax-api:jar:1.0.1:runtime
[INFO] | | | +- com.netflix.netflix-commons:netflix-eventbus:jar:0.3.0:runtime
[INFO] | | | | +- com.netflix.netflix-commons:netflix-infix:jar:0.3.0:runtime
[INFO] | | | | | +- commons-jxpath:commons-jxpath:jar:1.3:runtime
[INFO] | | | | | \- org.antlr:antlr-runtime:jar:3.4:runtime
[INFO] | | | | | \- org.antlr:stringtemplate:jar:3.2.1:runtime
[INFO] | | | | \- org.apache.commons:commons-math:jar:2.2:runtime
[INFO] | | | +- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | +- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] | | | \- com.google.inject:guice:jar:4.1.0:runtime
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:runtime
[INFO] | | +- com.netflix.eureka:eureka-core:jar:1.9.13:compile
[INFO] | | | \- com.fasterxml.woodstox:woodstox-core:jar:5.2.1:runtime
[INFO] | | | \- org.codehaus.woodstox:stax2-api:jar:4.2:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-loadbalancer:jar:2.2.1.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-loadbalancer:jar:2.2.1.RELEASE:compile
[INFO] | | | | +- io.projectreactor:reactor-core:jar:3.3.2.RELEASE:compile
[INFO] | | | | \- io.projectreactor.addons:reactor-extra:jar:3.3.2.RELEASE:compile
[INFO] | | | \- com.stoyanr:evictor:jar:1.0.0:compile
[INFO] | | +- com.netflix.ribbon:ribbon-eureka:jar:2.3.0:compile
[INFO] | | \- com.thoughtworks.xstream:xstream:jar:1.4.11.1:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-config:jar:2.2.1.RELEASE:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-config-client:jar:2.2.1.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.2.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.2.1.RELEASE:compile
[INFO] | | | \- io.github.openfeign.form:feign-form-spring:jar:3.8.0:compile
[INFO] | | | +- io.github.openfeign.form:feign-form:jar:3.8.0:compile
[INFO] | | | \- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] | | +- io.github.openfeign:feign-core:jar:10.4.0:compile
[INFO] | | +- io.github.openfeign:feign-slf4j:jar:10.4.0:compile
[INFO] | | \- io.github.openfeign:feign-hystrix:jar:10.4.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-cloud-connectors:jar:2.2.4.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-spring-service-connector:jar:2.0.7.RELEASE:compile
[INFO] | | | \- org.springframework.cloud:spring-cloud-connectors-core:jar:2.0.7.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-cloudfoundry-connector:jar:2.0.7.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-heroku-connector:jar:2.0.7.RELEASE:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-localconfig-connector:jar:2.0.7.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-data:jar:5.2.1.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.2.4.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.2.1.RELEASE:compile
[INFO] | +- io.micrometer:micrometer-registry-prometheus:jar:1.3.3:runtime
[INFO] | | \- io.prometheus:simpleclient_common:jar:0.7.0:runtime
[INFO] | | \- io.prometheus:simpleclient:jar:0.8.1:runtime
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:4.1.2:compile
[INFO] | +- org.modelmapper.extensions:modelmapper-spring:jar:2.3.0:compile
[INFO] | | \- org.modelmapper:modelmapper:jar:2.3.0:compile
[INFO] | +- joda-time:joda-time:jar:2.10.5:compile
[INFO] | +- org.projectlombok:lombok:jar:1.18.10:compile
[INFO] | \- org.keycloak:keycloak-spring-boot-starter:jar:9.0.0:compile
[INFO] | +- org.keycloak:keycloak-spring-boot-2-adapter:jar:9.0.0:compile
[INFO] | | \- org.keycloak:keycloak-spring-boot-adapter-core:jar:9.0.0:compile
[INFO] | +- org.keycloak:keycloak-authz-client:jar:9.0.0:compile
[INFO] | +- org.keycloak:spring-boot-container-bundle:jar:9.0.0:compile
[INFO] | \- org.keycloak:keycloak-spring-security-adapter:jar:9.0.0:compile
[INFO] | +- org.keycloak:keycloak-adapter-spi:jar:9.0.0:compile
[INFO] | \- org.keycloak:keycloak-adapter-core:jar:9.0.0:compile
[INFO] +- net.sf.jasperreports:jasperreports:jar:6.13.0:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- commons-digester:commons-digester:jar:2.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.2:compile
[INFO] | +- com.lowagie:itext:jar:2.1.7.js7:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.62:compile
[INFO] | +- org.jfree:jcommon:jar:1.0.23:compile
[INFO] | +- org.jfree:jfreechart:jar:1.0.19:compile
[INFO] | +- org.eclipse.jdt:ecj:jar:3.21.0:compile
[INFO] | +- org.codehaus.castor:castor-xml:jar:1.4.1:compile
[INFO] | | +- org.codehaus.castor:castor-core:jar:1.4.1:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.10.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.10.2:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.2:compile
[INFO] +- net.sf.jasperreports:jasperreports-fonts:jar:4.0.0:compile
[INFO] +- com.google.zxing:core:jar:3.3.0:compile
[INFO] +- com.google.zxing:javase:jar:3.3.0:compile
[INFO] | +- com.beust:jcommander:jar:1.48:compile
[INFO] | \- com.github.jai-imageio:jai-imageio-core:jar:1.3.1:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] +- com.google.api-client:google-api-client:jar:1.20.0:compile
[INFO] | +- com.google.oauth-client:google-oauth-client:jar:1.20.0:compile
[INFO] | | \- com.google.http-client:google-http-client:jar:1.20.0:compile
[INFO] | +- com.google.http-client:google-http-client-jackson2:jar:1.20.0:compile
[INFO] | \- com.google.guava:guava-jdk5:jar:13.0:compile
[INFO] +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.10.2:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile
[INFO] | \- jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.4.RELEASE:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.25:runtime
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.4.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.5.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:test
[INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.5.2:test
[INFO] | | +- org.junit.platform:junit-platform-engine:jar:1.5.2:test
[INFO] | | \- junit:junit:jar:4.12:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:test
[INFO] | +- org.assertj:assertj-core:jar:3.13.2:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.1:test
[INFO] | +- org.mockito:mockito-core:jar:3.1.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.6:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | +- org.springframework:spring-core:jar:5.2.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.2.3.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.2.3.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.3:test
[INFO] +- org.springframework.boot:spring-boot-test:jar:2.2.4.RELEASE:test
[INFO] | \- org.springframework.boot:spring-boot:jar:2.2.4.RELEASE:compile
[INFO] | \- org.springframework:spring-context:jar:5.2.3.RELEASE:compile
[INFO] +- org.keycloak:keycloak-admin-client:jar:9.0.0:compile
[INFO] | +- org.keycloak:keycloak-core:jar:9.0.0:compile
[INFO] | | +- org.keycloak:keycloak-common:jar:9.0.0:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] | +- org.jboss.resteasy:resteasy-multipart-provider:jar:3.9.1.Final:compile
[INFO] | | +- org.jboss.resteasy:resteasy-jaxrs:jar:3.9.1.Final:compile
[INFO] | | | +- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:jar:1.0.3.Final:compile
[INFO] | | | +- org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.3_spec:jar:1.0.1.Final:compile
[INFO] | | | +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec:jar:1.0.1.Final:compile
[INFO] | | | +- javax.activation:activation:jar:1.1.1:compile
[INFO] | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | +- org.jboss.resteasy:resteasy-client:jar:3.9.1.Final:compile
[INFO] | | +- org.jboss.resteasy:resteasy-jaxb-provider:jar:3.9.1.Final:compile
[INFO] | | +- com.sun.mail:javax.mail:jar:1.6.2:compile
[INFO] | | \- org.apache.james:apache-mime4j:jar:0.6:compile
[INFO] | \- org.jboss.resteasy:resteasy-jackson2-provider:jar:3.9.1.Final:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.10.2:compile
[INFO] | | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.10.2:compile
[INFO] | \- com.github.fge:json-patch:jar:1.9:compile
[INFO] | \- com.github.fge:jackson-coreutils:jar:1.6:compile
[INFO] | \- com.github.fge:msg-simple:jar:1.1:compile
[INFO] | \- com.github.fge:btf:jar:1.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-undertow:jar:2.2.4.RELEASE:compile
[INFO] | +- io.undertow:undertow-core:jar:2.0.29.Final:compile
[INFO] | | +- org.jboss.xnio:xnio-api:jar:3.3.8.Final:compile
[INFO] | | \- org.jboss.xnio:xnio-nio:jar:3.3.8.Final:runtime
[INFO] | +- io.undertow:undertow-servlet:jar:2.0.29.Final:compile
[INFO] | | \- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.2.Final:compile
[INFO] | +- io.undertow:undertow-websockets-jsr:jar:2.0.29.Final:compile
[INFO] | | \- org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:jar:1.1.4.Final:compile
[INFO] | +- jakarta.servlet:jakarta.servlet-api:jar:4.0.3:compile
[INFO] | \- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] \- org.springframework.boot:spring-boot-devtools:jar:2.2.4.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.4.RELEASE:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
Keycloak server is running
user and password are checked
maven build success
Api is running
create user api is KO
it's resolve it by :
adding this exclusion :
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
and upgrading jersey
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.17</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.17</version>
</dependency>
we are using spring-boot-1.5.6 along with RabbitMQ. The application was working fine till I consume software.amazon.awssdk:2.7.17. After consumed awssdk dependency we are getting below issue from RabbitMQ,
{
"timestamp":"2019-08-16T09:56:22.213+00:00",
"logMessage":"Consumer thread error, thread abort.",
"class":"org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer",
"level":"ERROR",
"error":"java.lang.BootstrapMethodError: call site initialization exception java.lang.invoke.CallSite.makeSite(CallSite.java:341) java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307) java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297) software.amazon.awssdk.http.apache.ApacheHttpClient.transformHeaders(ApacheHttpClient.java:272) software.amazon.awssdk.http.apache.ApacheHttpClient.createResponse(ApacheHttpClient.java:257) software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:237) software.amazon.awssdk.http.apache.ApacheHttpClient.access$500(ApacheHttpClient.java:102) software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:217) software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:66) software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:51) software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:35) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:64) software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:36) software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:77) software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:39) software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.doExecute(RetryableStage.java:113) software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:86) software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:62) software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:42) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:57) software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:37) software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80) software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60) software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206) software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37) software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26) software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:240) software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:96) software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:120) software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:73) software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44) software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:55) software.amazon.awssdk.services.iot.DefaultIotClient.registerThing(DefaultIotClient.java:7093) com.service.actions.AwsThingsRegisterAction.handle(AwsThingsRegisterAction.java:51) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:741) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) com.rabbit.RabbitDiagnosticAspect.aroundHandleRequest(RabbitDiagnosticAspect.java:25) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) com.consumer.StateMachineConsumer$$EnhancerBySpringCGLIB$$496eff04.executeNextStep(<generated>) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:180) org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:112) org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:49) org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:126) org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:106) org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:822) org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:745) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:97) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:189) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1276) org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:726) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1219) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1189) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1500(SimpleMessageListenerContainer.java:97) org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1421) java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.invoke.LambdaConversionException: Invalid receiver type interface org.apache.http.Header; not a subtype of implementation type interface org.apache.http.NameValuePair java.lang.invoke.AbstractValidatingLambdaMetafactory.validateMetafactoryArgs(AbstractValidatingLambdaMetafactory.java:233) java.lang.invoke.LambdaMetafactory.metafactory(LambdaMetafactory.java:303) java.lang.invoke.CallSite.makeSite(CallSite.java:302)\n\t... 86 common frames omitted\n",
"type":"run"
}
Anybody faced a similar issue? Any help would be really appreciated. It smells like Apache HttpClient issue but doesn't know how to fix.
UPDATE :
Dependency Tree:
[INFO] +- com.global.booking:booking-service-internal:jar:2.7.4:compile
[INFO] | \- com.global.booking:booking-service:jar:2.11.4:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:1.2.2.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:1.2.2.RELEASE:compile
[INFO] | | | +- org.springframework.cloud:spring-cloud-starter:jar:1.2.3.RELEASE:compile
[INFO] | | | | +- org.springframework.cloud:spring-cloud-context:jar:1.2.3.RELEASE:compile
[INFO] | | | | \- org.springframework.security:spring-security-rsa:jar:1.0.3.RELEASE:compile
[INFO] | | | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.55:compile
[INFO] | | | | \- org.bouncycastle:bcprov-jdk15on:jar:1.55:compile
[INFO] | | | \- org.springframework.cloud:spring-cloud-sleuth-core:jar:1.2.2.RELEASE:compile
[INFO] | | | \- org.aspectj:aspectjrt:jar:1.8.10:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:1.2.2.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-commons:jar:1.2.3.RELEASE:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:4.2.3.RELEASE:compile
[INFO] | | +- io.zipkin.java:zipkin:jar:1.28.0:compile
[INFO] | | \- io.zipkin.reporter:zipkin-reporter:jar:1.0.0:compile
[INFO] | +- de.codecentric:spring-boot-admin-starter-client:jar:1.5.3:compile
[INFO] | | \- org.springframework.boot:spring-boot-starter-actuator:jar:1.5.6.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot-actuator:jar:1.5.6.RELEASE:compile
[INFO] | +- io.springfox:springfox-swagger-ui:jar:2.7.0:compile
[INFO] | | \- io.springfox:springfox-spring-web:jar:2.7.0:compile
[INFO] | +- io.springfox:springfox-swagger2:jar:2.7.0:compile
[INFO] | | +- io.swagger:swagger-models:jar:1.5.13:compile
[INFO] | | +- io.springfox:springfox-spi:jar:2.7.0:compile
[INFO] | | | \- io.springfox:springfox-core:jar:2.7.0:compile
[INFO] | | | \- net.bytebuddy:byte-buddy:jar:1.6.14:compile
[INFO] | | +- io.springfox:springfox-schema:jar:2.7.0:compile
[INFO] | | +- io.springfox:springfox-swagger-common:jar:2.7.0:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] | | \- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | +- org.mapstruct:mapstruct-jdk8:jar:1.1.0.Final:compile
[INFO] | +- org.jolokia:jolokia-core:jar:1.3.7:compile
[INFO] | +- org.codehaus.janino:janino:jar:2.7.8:compile
[INFO] | | \- org.codehaus.janino:commons-compiler:jar:2.7.8:compile
[INFO] | +- com.getsentry.raven:raven-logback:jar:7.1.0:compile
[INFO] | | \- com.getsentry.raven:raven:jar:7.1.0:compile
[INFO] | \- biz.paluch.logging:logstash-gelf:jar:1.11.0:compile
[INFO] +- com.global.booking:booking-rabbit:jar:1.0.0:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.10.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.3.10.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.3.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:4.3.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:4.3.10.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-aop:jar:1.5.6.RELEASE:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.8.10:compile
[INFO] +- com.global.booking:booking-common:jar:2.13.0:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.6.RELEASE:compile
[INFO] | | \- org.springframework.boot:spring-boot:jar:1.5.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.6.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.25: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.springframework.data:spring-data-commons:jar:1.13.6.RELEASE:compile
[INFO] | +- net.logstash.logback:logstash-logback-encoder:jar:4.7:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] | \- org.springframework.ws:spring-ws-support:jar:2.4.0.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-ws-core:jar:2.4.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-oxm:jar:4.3.10.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-xml:jar:2.4.0.RELEASE:compile
[INFO] | \- org.springframework:spring-jms:jar:4.3.10.RELEASE:compile
[INFO] +- com.global.booking:transaction-repository:jar:4.2.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-data-mongodb:jar:1.5.6.RELEASE:compile
[INFO] | | +- org.mongodb:mongodb-driver:jar:3.4.2:compile
[INFO] | | | +- org.mongodb:bson:jar:3.4.2:compile
[INFO] | | | \- org.mongodb:mongodb-driver-core:jar:3.4.2:compile
[INFO] | | \- org.springframework.data:spring-data-mongodb:jar:1.10.6.RELEASE:compile
[INFO] | +- com.querydsl:querydsl-mongodb:jar:4.1.4:compile
[INFO] | | \- com.querydsl:querydsl-core:jar:4.1.4:compile
[INFO] | | +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
[INFO] | | \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
[INFO] | +- com.querydsl:querydsl-apt:jar:4.1.4:compile
[INFO] | | +- com.querydsl:querydsl-codegen:jar:4.1.4:compile
[INFO] | | | +- com.mysema.codegen:codegen:jar:0.6.8:compile
[INFO] | | | | \- org.eclipse.jdt.core.compiler:ecj:jar:4.3.1:compile
[INFO] | | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | | \- org.reflections:reflections:jar:0.9.9:compile
[INFO] | | | +- org.javassist:javassist:jar:3.21.0-GA:compile
[INFO] | | | \- com.google.code.findbugs:annotations:jar:2.0.1:compile
[INFO] | | \- javax.jdo:jdo-api:jar:3.0.1:compile
[INFO] | | \- javax.transaction:jta:jar:1.1:compile
[INFO] | \- org.projectlombok:lombok:jar:1.16.18:compile
[INFO] +- com.global.booking:lifecycle-models:jar:1.7.0:compile
[INFO] +- com.global.booking:booking-plugin-java-sdk:jar:4.5.3:compile
[INFO] | +- com.global.booking:plugin-repository-sdk:jar:6.1.0:compile
[INFO] | | +- com.global.booking:plugin-repository-model:jar:4.0.1:compile
[INFO] | | \- com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] | +- com.global.booking:booking-plugin-common:jar:4.3.12:compile
[INFO] | +- com.global.booking:capabilities-models:jar:1.2.1:compile
[INFO] | +- com.google.guava:guava:jar:19.0:compile
[INFO] | \- com.global.booking:addon-service-model:jar:1.2.3:compile
[INFO] +- com.global.booking:device-control-sdk:jar:1.0.0:compile
[INFO] | +- com.global.booking:device-control-model:jar:1.0.0:compile
[INFO] | \- com.global.booking:booking-common-sdk:jar:2.0.0:compile
[INFO] +- com.global.booking:partner-accounts-java-sdk:jar:1.0.1-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:1.5.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.6.RELEASE:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.16:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.16:compile
[INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.16:compile
[INFO] | | +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
[INFO] | | | \- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:4.3.10.RELEASE:compile
[INFO] | \- org.assertj:assertj-core:jar:2.6.0:compile
[INFO] +- com.global.booking:booking-adapter-java-sdk:jar:1.6.0-SNAPSHOT:compile
[INFO] | \- com.global.booking:booking-adapter-model:jar:1.6.0-SNAPSHOT:compile
[INFO] +- com.global.booking:opco-java-sdk:jar:1.8.1:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile
[INFO] +- com.global.booking:content-repository-sdk:jar:4.19.2:compile
[INFO] | +- commons-io:commons-io:jar:2.5:compile
[INFO] | +- com.global.booking:content-repository-model:jar:4.19.2:compile
[INFO] | \- com.global.booking:validator:jar:1.3.3:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- com.global.booking:customer-profile-java-sdk:jar:2.5.5:compile
[INFO] | \- com.global.booking:customer-profile-model:jar:2.5.2:compile
[INFO] +- com.global.booking:scheduler-java-sdk:jar:1.1.2:compile
[INFO] | \- io.swagger:swagger-annotations:jar:1.5.10:compile
[INFO] +- com.global.booking:addon-java-sdk:jar:1.4.0:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-hateoas:jar:1.5.6.RELEASE:compile
[INFO] | | +- org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile
[INFO] | | \- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.8.9:compile
[INFO] +- com.global.booking:subscription-info:jar:1.4.2:compile
[INFO] | \- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- org.modelmapper:modelmapper:jar:2.3.0:compile
[INFO] +- joda-time:joda-time:jar:2.9.9:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.6.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.6.RELEASE:test
[INFO] | +- junit:junit:jar:4.12:compile
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:compile
[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.10.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.10.RELEASE:test
[INFO] +- org.springframework.amqp:spring-rabbit-test:jar:1.7.3.RELEASE:test
[INFO] | +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] | \- org.springframework.amqp:spring-rabbit:jar:1.7.3.RELEASE:compile
[INFO] | +- com.rabbitmq:amqp-client:jar:4.0.2:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.2.1.RELEASE:compile
[INFO] | +- org.springframework.amqp:spring-amqp:jar:1.7.3.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:4.3.10.RELEASE:compile
[INFO] +- com.github.fakemongo:fongo:jar:2.0.10:test
[INFO] | +- org.mozilla:rhino:jar:1.7.7.1:test
[INFO] | +- com.vividsolutions:jts:jar:1.13:test
[INFO] | \- de.grundid.opendatalab:geojson-jackson:jar:1.2:test
[INFO] +- io.github.benas:random-beans:jar:3.6.0:compile
[INFO] | +- org.objenesis:objenesis:jar:2.5.1:compile
[INFO] | \- io.github.lukehutch:fast-classpath-scanner:jar:2.0.17:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.2.0:compile
[INFO] | +- net.minidev:json-smart:jar:2.2.1:compile
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:compile
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- software.amazon.awssdk:iot:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:aws-json-protocol:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:protocol-core:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:sdk-core:jar:2.7.17:compile
[INFO] | | +- software.amazon.awssdk:profiles:jar:2.7.17:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] | +- software.amazon.awssdk:auth:jar:2.7.17:compile
[INFO] | | \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO] | +- software.amazon.awssdk:http-client-spi:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:regions:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:annotations:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:utils:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:aws-core:jar:2.7.17:compile
[INFO] | +- software.amazon.awssdk:apache-client:jar:2.7.17:runtime
[INFO] | \- software.amazon.awssdk:netty-nio-client:jar:2.7.17:runtime
[INFO] | +- io.netty:netty-codec-http:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-codec-http2:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-codec:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-transport:jar:4.1.33.Final:runtime
[INFO] | | \- io.netty:netty-resolver:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-common:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-buffer:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-handler:jar:4.1.33.Final:runtime
[INFO] | +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.33.Final:runtime
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.33.Final:runtime
[INFO] | \- com.typesafe.netty:netty-reactive-streams-http:jar:2.0.0:runtime
[INFO] | \- com.typesafe.netty:netty-reactive-streams:jar:2.0.0:runtime
[INFO] \- org.springframework.boot:spring-boot-starter-amqp:jar:1.5.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.5.6.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] \- org.springframework:spring-messaging:jar:4.3.10.RELEASE:compile
UPDATE :
RABBITLISTENER CLASS:
import com.booking.global.booking.service.BookingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import static com.bookingglobal.booking.service.BookingConstants.STATE_MACHINE;
#Component
public class BookingConsumer {
private #Autowired
BookingService bookingService;
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = BOOKING_EXECUTE_NEXT_STEP, durable = "true", autoDelete = "false"),
exchange = #Exchange(value = BOOKING_EXCHANGE, durable = "true"),
key = BOOKING_EXECUTE_NEXT_STEP))
void executeNextStep(String transactionId) {
LOGGER.debug("Consuming a rabbit message from queue {} for transaction {}", BOOKING_EXECUTE_NEXT_STEP, transactionId);
bookingService.executeNextStep(transactionId);
}
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = BOOKING_EXECUTE_NEXT_STEP_WITH_DELAY, durable = "true", autoDelete = "false"),
exchange = #Exchange(value = BOOKING_DELAYED_EXCHANGE, durable = "true", delayed = "true"),
key = BOOKING_EXECUTE_NEXT_STEP_WITH_DELAY))
void executeNextStepWithDelay(String transactionId) {
LOGGER.debug("Consuming a rabbit message from queue {} for transaction {}", BOOKING_EXECUTE_NEXT_STEP_WITH_DELAY, transactionId);
bookingService.executeNextStep(transactionId);
}
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = BOOKING_RETRY_FAILED_STEP, durable = "true", autoDelete = "false"),
exchange = #Exchange(value = BOOKING_DELAYED_EXCHANGE, durable = "true", delayed = "true"),
key = BOOKING_RETRY_FAILED_STEP))
void retryFailedStep(String transactionId) {
LOGGER.debug("Consuming a rabbit message from queue {} for transaction {}", BOOKING_RETRY_FAILED_STEP, transactionId);
bookingService.retryStep(transactionId);
}
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = BOOKING_STEP_TIMEOUT_TIMER, durable = "true", autoDelete = "false"),
exchange = #Exchange(value = BOOKING_DELAYED_EXCHANGE, durable = "true", delayed = "true"),
key = BOOKING_STEP_TIMEOUT_TIMER))
void handleStepTimeout(StepTimeoutTimerMessage message) {
String transactionId = message.getTransactionId();
LOGGER.debug("Consuming a rabbit message from queue {} for transaction {}", BOOKING_STEP_TIMEOUT_TIMER, transactionId);
bookingService.timeoutStep(transactionId, message.getStepCorrelationId());
}
#RabbitListener(bindings = #QueueBinding(
value = #Queue(value = BOOKING_STEP_TIMEOUT_TIMER_V2, durable = "true", autoDelete = "false"),
exchange = #Exchange(value = BOOKING_DELAYED_EXCHANGE, durable = "true", delayed = "true"),
key = BOOKING_STEP_TIMEOUT_TIMER_V2))
void handleStepTimeoutV2(StepTimeoutMessageV2 message) {
LOGGER.debug("Consuming a rabbit message from queue {} for transaction {}", BOOKING_STEP_TIMEOUT_TIMER_V2, message.getStepUid());
bookingService.timeoutStep(message.getStepUid());
}
}
Sounds like Apache HTTP Client incompatibility.
Consider to exclude com.rabbitmq:http-client artifact from Spring AMQP dependency.
Let's assume you have a Maven project generated via Spring Start IO site! So, you must have something like this:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
So, you just add an exclusion:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
<exclusions>
<exclusion>
<groupId>com.rabbitmq</groupId>
<artifactId>http-client</artifactId>
</exclusion>
</exclusions>
</dependency>
That's my best guess what is going on and let's hope you don't use RabbitMQ Management API: https://docs.spring.io/spring-amqp/docs/current/reference/html/#management-rest-api !
I am use spring-cloud-gateay in my service mesh, when start it I have get a error:
Caused by: java.lang.NoSuchMethodError: org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient.<init>(Ljava/util/function/Consumer;)V
Dependencies:
[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) # gateway ---
[INFO] cn.rctech.egg:gateway:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:5.1.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.1.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:5.1.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.3.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.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0: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.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.1.6.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- org.springframework.cloud:spring-cloud-starter-gateway:jar:2.0.3.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-gateway-core:jar:2.0.3.RELEASE:compile
[INFO] | | \- io.projectreactor.addons:reactor-extra:jar:3.1.6.RELEASE:compile
[INFO] | | \- io.projectreactor:reactor-core:jar:3.1.8.RELEASE:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-webflux:jar:2.0.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.3.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.7:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-annotations: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-reactor-netty:jar:2.0.3.RELEASE:compile
[INFO] | | \- io.projectreactor.ipc:reactor-netty:jar:0.7.8.RELEASE:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.25.Final:compile
[INFO] | | | \- io.netty:netty-codec:jar:4.1.25.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.25.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.25.Final:compile
[INFO] | | | \- io.netty:netty-transport:jar:4.1.25.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.25.Final:compile
[INFO] | | +- io.netty:netty-handler-proxy:jar:4.1.25.Final:compile
[INFO] | | | \- io.netty:netty-codec-socks:jar:4.1.25.Final:compile
[INFO] | | \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.25.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.25.Final:compile
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.25.Final:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.10.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework:spring-web:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-webflux:jar:5.1.6.RELEASE:compile
[INFO] | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] +- com.alibaba.boot:nacos-config-spring-boot-starter:jar:0.2.1:compile
[INFO] | +- com.alibaba.nacos:nacos-spring-context:jar:0.2.3-RC1:compile
[INFO] | | +- com.alibaba.nacos:nacos-client:jar:1.0.0:compile
[INFO] | | | +- com.alibaba.nacos:nacos-common:jar:1.0.0:compile
[INFO] | | | | +- commons-io:commons-io:jar:2.6:compile
[INFO] | | | | \- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | | | +- com.alibaba.nacos:nacos-api:jar:1.0.0:compile
[INFO] | | | | \- com.alibaba:fastjson:jar:1.2.47:compile
[INFO] | | | +- com.google.guava:guava:jar:23.0:compile
[INFO] | | | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | | | +- com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
[INFO] | | | | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | | | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] | | | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.7:compile
[INFO] | | | \- io.prometheus:simpleclient:jar:0.5.0:compile
[INFO] | | \- com.alibaba.spring:spring-context-support:jar:1.0.1:compile
[INFO] | +- com.alibaba.boot:nacos-config-spring-boot-autoconfigure:jar:0.2.1:compile
[INFO] | \- com.alibaba.boot:nacos-spring-boot-base:jar:0.2.1:compile
[INFO] +- com.alibaba.boot:nacos-discovery-spring-boot-starter:jar:0.2.1:compile
[INFO] | \- com.alibaba.boot:nacos-discovery-spring-boot-autoconfigure:jar:0.2.1:compile
[INFO] \- org.springframework.cloud:spring-cloud-starter:jar:2.0.3.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-context:jar:2.0.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-crypto:jar:5.0.6.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-commons:jar:2.0.3.RELEASE:compile
[INFO] \- org.springframework.security:spring-security-rsa:jar:1.0.7.RELEASE:compile
[INFO] \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] \- org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
After read source code I found The org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient of org.springframework:spring-webflux:5.1.6.RELEASE is :
public class ReactorNettyWebSocketClient implements WebSocketClient {
private static final Log logger = LogFactory.getLog(ReactorNettyWebSocketClient.class);
private final HttpClient httpClient;
/**
* Default constructor.
*/
public ReactorNettyWebSocketClient() {
this(HttpClient.create());
}
/**
* Constructor that accepts an existing {#link HttpClient} builder.
* #since 5.1
*/
public ReactorNettyWebSocketClient(HttpClient httpClient) {
Assert.notNull(httpClient, "HttpClient is required");
this.httpClient = httpClient;
}
.....
}
It's second constructor above need a HttpClient object to instance, that mismatched with org/springframework/cloud/gateway/config/GatewayAutoConfiguration$NettyConfiguration.class.
#Bean
public ReactorNettyWebSocketClient reactorNettyWebSocketClient(#Qualifier("nettyClientOptions") Consumer<? super HttpClientOptions.Builder> options) {
return new ReactorNettyWebSocketClient(options);
}
This bug is documented on Github.
Here is one of the correct combinations of Versions that will work:
Parent:
<parent>
<groupSId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.X</version> // I tested on <version>2.2.1.RELEASE</version>
</parent>
Cloud Version:
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
This is somewhat caused by the tomcat-embed-core version 8.5.4 that comes with the spring-boot-starter-jersey. It generates an error shown below on all integration tests. It will only work if I override the pom to use tomcat-embed-core version 8.0.36. What's weird is, that's the only error message I get.
java.lang.NullPointerException: null
at org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1140)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:431)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Here's my dependecy tree:
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # sample-services ---
[INFO] com.sample:sample-services:jar:1.0.0-SNAPSHOT
[INFO] +- com.sample:sample-customer:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- com.sample:sample-core:jar:1.0.0-SNAPSHOT:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE:compile
[INFO] | | | +- org.springframework.boot:spring-boot-starter-aop:jar:1.4.0.RELEASE:compile
[INFO] | | | | \- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] | | | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.0.RELEASE:compile
[INFO] | | | | +- org.apache.tomcat:tomcat-jdbc:jar:8.5.4:compile
[INFO] | | | | | \- org.apache.tomcat:tomcat-juli:jar:8.5.4:compile
[INFO] | | | | \- org.springframework:spring-jdbc:jar:4.3.2.RELEASE:compile
[INFO] | | | +- org.hibernate:hibernate-core:jar:5.0.9.Final:compile
[INFO] | | | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | | +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] | | | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | | | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] | | | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | | | +- org.hibernate:hibernate-entitymanager:jar:5.0.9.Final:compile
[INFO] | | | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | | | +- org.springframework.data:spring-data-jpa:jar:1.10.2.RELEASE:compile
[INFO] | | | | \- org.springframework:spring-orm:jar:4.3.2.RELEASE:compile
[INFO] | | | \- org.springframework:spring-aspects:jar:4.3.2.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.4.0.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.7:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.7:compile
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | | +- com.h2database:h2:jar:1.4.192:compile
[INFO] | | +- org.postgresql:postgresql:jar:9.4.1209.jre7:compile
[INFO] | | +- javax:javaee-api:jar:7.0:compile
[INFO] | | | \- com.sun.mail:javax.mail:jar:1.5.5:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] | | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
[INFO] | | +- org.joda:joda-money:jar:0.10.0:compile
[INFO] | | \- com.sun.jna:jna:jar:3.0.9:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-data-elasticsearch:jar:1.4.0.RELEASE:compile
[INFO] | | \- org.springframework.data:spring-data-elasticsearch:jar:2.0.2.RELEASE:compile
[INFO] | | +- org.springframework:spring-tx:jar:4.3.2.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.12.2.RELEASE:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | | \- org.elasticsearch:elasticsearch:jar:2.3.4:compile
[INFO] | | +- org.apache.lucene:lucene-core:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-backward-codecs:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-analyzers-common:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-queries:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-memory:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-highlighter:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-queryparser:jar:5.5.0:compile
[INFO] | | | \- org.apache.lucene:lucene-sandbox:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-suggest:jar:5.5.0:compile
[INFO] | | | \- org.apache.lucene:lucene-misc:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-join:jar:5.5.0:compile
[INFO] | | | \- org.apache.lucene:lucene-grouping:jar:5.5.0:compile
[INFO] | | +- org.apache.lucene:lucene-spatial:jar:5.5.0:compile
[INFO] | | | +- org.apache.lucene:lucene-spatial3d:jar:5.5.0:compile
[INFO] | | | \- com.spatial4j:spatial4j:jar:0.5:compile
[INFO] | | +- org.elasticsearch:securesm:jar:1.0:compile
[INFO] | | +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] | | +- org.joda:joda-convert:jar:1.2:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.1:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.1:compile
[INFO] | | +- io.netty:netty:jar:3.10.5.Final:compile
[INFO] | | +- com.ning:compress-lzf:jar:1.0.2:compile
[INFO] | | +- com.tdunning:t-digest:jar:3.0:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.6:compile
[INFO] | | +- commons-cli:commons-cli:jar:1.3.1:compile
[INFO] | | \- com.twitter:jsr166e:jar:1.1.0:compile
[INFO] | +- com.google.guava:guava:jar:19.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- commons-io:commons-io:jar:2.5:compile
[INFO] | +- net.sf.uadetector:uadetector-core:jar:0.9.22:compile
[INFO] | | +- net.sf.qualitycheck:quality-check:jar:1.3:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:2.0.3:compile
[INFO] | | \- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] | +- net.sf.uadetector:uadetector-resources:jar:2014.10:compile
[INFO] | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.8.1:compile
[INFO] +- com.sample:sample-messaging:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- com.amazonaws:aws-java-sdk-sns:jar:1.11.24:compile
[INFO] | \- com.amazonaws:aws-java-sdk-sqs:jar:1.11.24:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jersey:jar:1.4.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.0.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.4:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.4:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:1.4.0.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.2.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.3.2.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.3.2.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:4.3.2.RELEASE:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.23.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.23.1:compile
[INFO] | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.23.1:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] | | \- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] | | \- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-spring3:jar:2.23.1:compile
[INFO] | | +- org.glassfish.hk2:hk2:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:config-types:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-core:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-config:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-runlevel:jar:2.4.0-b34:compile
[INFO] | | | \- org.glassfish.hk2:class-model:jar:2.4.0-b34:compile
[INFO] | | | \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.4.0-b34:compile
[INFO] | | \- org.glassfish.hk2:spring-bridge:jar:2.4.0-b34:compile
[INFO] | \- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.23.1:compile
[INFO] | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.1:compile
[INFO] | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.1:compile
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.1:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.0.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.1:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.2.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.2.RELEASE:compile
[INFO] +- com.amazonaws:aws-java-sdk-s3:jar:1.11.24:compile
[INFO] | +- com.amazonaws:aws-java-sdk-kms:jar:1.11.24:compile
[INFO] | \- com.amazonaws:aws-java-sdk-core:jar:1.11.24:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.1:compile
[INFO] | \- joda-time:joda-time:jar:2.9.4:compile
[INFO] +- com.wordnik:swagger-jersey2-jaxrs_2.10:jar:1.3.13:compile
[INFO] | +- com.wordnik:swagger-jaxrs_2.10:jar:1.3.13:compile
[INFO] | | +- com.wordnik:swagger-core_2.10:jar:1.3.13:compile
[INFO] | | | +- com.fasterxml.jackson.module:jackson-module-scala_2.10:jar:2.4.1:compile
[INFO] | | | | \- com.thoughtworks.paranamer:paranamer:jar:2.6:compile
[INFO] | | | +- com.fasterxml.jackson.module:jackson-module-jsonSchema:jar:2.4.1:compile
[INFO] | | | +- com.wordnik:swagger-annotations:jar:1.3.13:compile
[INFO] | | | +- org.json4s:json4s-ext_2.10:jar:3.2.11:compile
[INFO] | | | +- org.json4s:json4s-native_2.10:jar:3.2.11:compile
[INFO] | | | | \- org.json4s:json4s-core_2.10:jar:3.2.11:compile
[INFO] | | | | +- org.json4s:json4s-ast_2.10:jar:3.2.11:compile
[INFO] | | | | \- org.scala-lang:scalap:jar:2.10.0:compile
[INFO] | | | | \- org.scala-lang:scala-compiler:jar:2.10.0:compile
[INFO] | | | \- org.json4s:json4s-jackson_2.10:jar:3.2.11:compile
[INFO] | | \- org.reflections:reflections:jar:0.9.9:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:2.0.1:compile
[INFO] | \- org.glassfish.jersey.media:jersey-media-multipart:jar:2.1:compile
[INFO] | \- org.jvnet.mimepull:mimepull:jar:1.8:compile
[INFO] +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.23.1:compile
[INFO] | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.23.1:compile
[INFO] | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.23.1:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | +- javax.el:javax.el-api:jar:2.2.4:compile
[INFO] | +- org.glassfish.web:javax.el:jar:2.2.4:compile
[INFO] | \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- com.jayway.restassured:rest-assured:jar:2.9.0:test
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.7:test
[INFO] | +- org.codehaus.groovy:groovy-xml:jar:2.4.7:test
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.2:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.ccil.cowan.tagsoup:tagsoup:jar:1.2.1:test
[INFO] | +- com.jayway.restassured:json-path:jar:2.9.0:test
[INFO] | | +- org.codehaus.groovy:groovy-json:jar:2.4.7:test
[INFO] | | \- com.jayway.restassured:rest-assured-common:jar:2.9.0:test
[INFO] | \- com.jayway.restassured:xml-path:jar:2.9.0:test
[INFO] +- com.jayway.jsonpath:json-path:jar:2.2.0:compile
[INFO] | +- net.minidev:json-smart:jar:2.2.1:compile
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:compile
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.4.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.4.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.0.RELEASE:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | \- org.objenesis:objenesis:jar:2.1:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.3.0:test
[INFO] | +- org.springframework:spring-core:jar:4.3.2.RELEASE:compile
[INFO] | \- org.springframework:spring-test:jar:4.3.2.RELEASE:test
[INFO] +- org.assertj:assertj-core:jar:3.2.0:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:1.4.0.RELEASE:compile
[INFO] | \- org.json:json:jar:20140107:compile
[INFO] +- org.neo4j:neo4j-cypher-compiler-2.2:jar:2.2.5:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.10.5:compile
[INFO] | +- org.scala-lang:scala-reflect:jar:2.10.5:compile
[INFO] | +- org.parboiled:parboiled-scala_2.10:jar:1.1.7:compile
[INFO] | | \- org.parboiled:parboiled-core:jar:1.1.7:compile
[INFO] | \- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile
[INFO] \- org.springframework.boot:spring-boot-devtools:jar:1.4.0.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile
And here's my Application class:
#EntityScan(basePackageClasses = { Application.class, Jsr310JpaConverters.class })
#EnableScheduling
#EnableAsync
#SpringBootApplication(scanBasePackages = "com.sample")
public class Application extends Loggable implements AsyncConfigurer {
/**
* This forces the SNS topics to be created and/or linked.
*/
#Autowired
#SuppressWarnings("all")
private TopicFactory topicFactory;
/**
* It all begins here.
*/
public static void main(String[] args) throws Exception {
SpringApplication application = new SpringApplication(Application.class);
application.setBanner(new SampleBanner());
application.run(args);
}
/**
* Returns the #Async executor.
*/
#Override
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(4);
executor.setMaxPoolSize(4);
executor.setQueueCapacity(0);
executor.setThreadNamePrefix("Async-");
executor.initialize();
return executor;
}
/**
* Returns the uncaught exception handler for #Async operations.
*/
#Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return (e, method, params) -> log.error("Uncaught async error", e);
}
}
If someone could point me out where to start or what's causing it to fail, it would be of great help.
Possible fixes:
1) Set authConfigFactory to default AuthConfigFactory implementation used by Tomcat 8.5 (example basic implementation):
package com.example;
import org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import javax.security.auth.message.config.AuthConfigFactory;
#SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
if (AuthConfigFactory.getFactory() == null) {
AuthConfigFactory.setFactory(new AuthConfigFactoryImpl());
}
SpringApplication.run(DemoApplication.class, args);
}
}
or
2) Remove duplicated AuthConfigFactory class from your classpath. In my case there were two different implementations of the same class:
org.apache.tomcat.embed/tomcat-embed-core/8.5.4/tomcat-embed-core-8.5.4.jar!/javax/security/auth/message/config/AuthConfigFactory.class
javax/javaee-api/7.0/javaee-api-7.0.jar!/javax/security/auth/message/config/AuthConfigFactory.class
javaee-api-7.0.jar has it's own AuthConfigFactory implementation which is not fully compatible with Tomcat 8.5 and causes that NullPointerException (in Tomcat's version there is constant which defines default jaspic implementation class)
Remove javaee-api dependency (or any other which contains different AuthConfigFactory implementation) from your gradle/mvn project (if you can)
or
3) Downgrade Tomcat to 8.0 or 7.0:
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-use-tomcat-7
Explanation:
The problem is related with Tomcat upgrade (from 8.0.x to 8.5.x) which has been made during Spring Boot upgrade from 1.3.x to 1.4.
The problem is that Tomcat 8.5 introduces jaspic support (https://tomcat.apache.org/tomcat-8.5-doc/config/jaspic.html) and provides it's own implementation of AuthConfigFactory. This implementation defines default jaspic auth factory implementation:
private static final String DEFAULT_JASPI_AUTHCONFIGFACTORYIMPL =
"org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl";
which is not defined in other implementations (e.g. that one from javaee-api-7.0) and causes NullPointerException because no AuthConfigFactory were instantiated.
I'm getting the following error with Spring Data Neo4j 4. I think it could be a dependency conflict but I'm not sure what.
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:183) at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:123) at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:228) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:217) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:276) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:278) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\*****\*****-spa\core\target\test-classes\nz\co\*****\TestNeo4jConfig.class]; nested exception is java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories.repositoryBaseClass()
The highlight of the above seems to be.
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\thescene\thescene-spa\core\target\test-classes\nz\co\thescene\TestNeo4jConfig.class]; nested exception is java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.neo4j.repository.config.EnableNeo4jRepositories.repositoryBaseClass()
My spring dependencies are:
[INFO] +- org.springframework:spring-beans:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.0.M5:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:1.3.0.M5:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.2.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.2.6.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.2.6.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-crypto:jar:3.2.7.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-neo4j:jar:4.0.0.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:4.2.1.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:1.9.2.RELEASE:compile
[INFO] +- org.springframework.data:spring-data-neo4j:test-jar:tests:4.0.0.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.3.0.M5:test
[INFO] +- org.springframework:spring-test:jar:4.2.1.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.2.6.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-tomcat:jar:1.2.6.RELEASE:compile
[INFO] +- org.springframework.security.oauth:spring-security-oauth2:jar:2.0.7.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-core:jar:4.0.2.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.0.2.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-web:jar:4.0.2.RELEASE:compile
[INFO] \- org.springframework.social:spring-social-core:jar:1.2.0.BUILD-SNAPSHOT:compile
My neo4j dependencies are:
[INFO] +- org.springframework.data:spring-data-neo4j:jar:4.0.0.RELEASE:compile
[INFO] | +- org.neo4j:neo4j-ogm:jar:1.1.2:compile
[INFO] +- org.neo4j:neo4j-kernel:jar:2.2.5:compile
[INFO] | +- org.neo4j:neo4j-primitive-collections:jar:2.2.5:compile
[INFO] | \- org.neo4j:neo4j-csv:jar:2.2.5:compile
[INFO] +- org.neo4j:neo4j-io:jar:2.2.5:compile
[INFO] | \- org.neo4j:neo4j-unsafe:jar:2.2.5:compile
[INFO] +- org.neo4j.test:neo4j-harness:jar:2.2.5:test
[INFO] | +- org.neo4j.app:neo4j-server:jar:2.2.5:compile
[INFO] | | +- org.neo4j:neo4j-cypher:jar:2.2.5:compile
[INFO] | | | +- org.neo4j:neo4j-lucene-index:jar:2.2.5:compile
[INFO] | | | +- org.neo4j:neo4j-graph-matching:jar:2.2.5:compile
[INFO] | | | +- org.neo4j:neo4j-graph-algo:jar:2.2.5:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-compiler-1.9:jar:2.0.4:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-compiler-2.0:jar:2.0.4:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-compiler-2.1:jar:2.1.8:compile
[INFO] | | | +- org.neo4j:neo4j-cypher-compiler-2.2:jar:2.2.5:compile
[INFO] | | +- org.neo4j.app:neo4j-browser:jar:2.2.5:compile
[INFO] | | \- org.neo4j:neo4j-shell:jar:2.2.5:compile
[INFO] | +- org.neo4j:neo4j-kernel:test-jar:tests:2.2.5:test
[INFO] | +- org.neo4j:neo4j-io:test-jar:tests:2.2.5:test
[INFO] +- org.springframework.data:spring-data-neo4j:test-jar:tests:4.0.0.RELEASE:test
[INFO] +- org.neo4j:neo4j-ogm:test-jar:tests:1.1.2:test
[INFO] | \- org.neo4j:server-api:jar:2.2.5:compile
[INFO] | \- org.neo4j.3rdparty.javax.ws.rs:jsr311-api:jar:1.1.2.r612:compile
Here are all the rest:
[INFO] nz.co.*****:*****-core:jar:0.0.1-SNAPSHOT
[INFO] +- nz.co.*****:*****-model:jar:0.0.1-SNAPSHOT:compile
[INFO] | \- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[INFO] | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.1.3:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.1.3:compile
[INFO] | +- org.slf4j:jul-to-slf4j:jar:1.7.12:compile
[INFO] | \- org.slf4j:log4j-over-slf4j:jar:1.7.12:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.14:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.8.6:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.8.6:compile
[INFO] +- com.voodoodyne.jackson.jsog:jackson-jsog:jar:1.1:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.4:compile
[INFO] +- com.squareup.okhttp:okhttp:jar:2.5.0:compile
[INFO] | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] | | | +- org.scala-lang:scala-library:jar:2.10.5:compile
[INFO] | | | +- org.scala-lang:scala-reflect:jar:2.10.5:compile
[INFO] | | | | \- org.apache.lucene:lucene-core:jar:3.6.2:compile
[INFO] | | | +- org.parboiled:parboiled-scala_2.10:jar:1.1.7:compile
[INFO] | | | | \- org.parboiled:parboiled-core:jar:1.1.7:compile
[INFO] | | | +- net.sf.opencsv:opencsv:jar:2.3:compile
[INFO] | | | \- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.4:compile
[INFO] | | +- ch.qos.logback:logback-access:jar:1.1.3:compile
[INFO] | | +- org.codehaus.janino:janino:jar:2.6.1:compile
[INFO] | | | \- org.codehaus.janino:commons-compiler:jar:2.6.1:compile
[INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:compile
[INFO] | | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] | | | +- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:compile
[INFO] | | | | \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:compile
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:9.2.13.v20150730:compile
[INFO] | | | +- org.eclipse.jetty:jetty-xml:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:compile
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:9.2.13.v20150730:compile
[INFO] | | +- com.sun.jersey:jersey-server:jar:1.13:compile
[INFO] | | | \- asm:asm:jar:3.1:compile
[INFO] | | +- com.sun.jersey:jersey-servlet:jar:1.13:compile
[INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.13:compile
[INFO] | | +- org.rrd4j:rrd4j:jar:2.2:compile
[INFO] | | +- org.mozilla:rhino:jar:1.7R4:compile
[INFO] | | +- bouncycastle:bcprov-jdk16:jar:140:compile
[INFO] | | +- com.sun.jersey.contribs:jersey-multipart:jar:1.19:compile
[INFO] | | | \- org.jvnet.mimepull:mimepull:jar:1.9.3:compile
[INFO] | | \- org.apache.servicemix.bundles:org.apache.servicemix.bundles.jline:jar:0.9.94_1:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] | +- commons-digester:commons-digester:jar:2.1:compile
[INFO] | | \- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | \- com.sun.jersey:jersey-client:jar:1.13:test
[INFO] | \- com.sun.jersey:jersey-core:jar:1.13:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile
[INFO] +- org.jasypt:jasypt:jar:1.9.2:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-json-org:jar:2.5.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.5.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.5.4:compile
[INFO] | \- org.apache.geronimo.bundles:json:jar:20090211_1:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.2:compile
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.5.4:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.3.2:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- org.mockito:mockito-core:jar:2.0.2-beta: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] +- junit:junit:jar:4.12:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO] +- org.jbehave:jbehave-core:jar:4.0.1:test
[INFO] | +- org.hamcrest:hamcrest-integration:jar:1.3:test
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- commons-io:commons-io:jar:2.4:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.10:test
[INFO] | +- org.freemarker:freemarker:jar:2.3.22:test
[INFO] | \- com.thoughtworks.paranamer:paranamer:jar:2.4:test
[INFO] +- org.jbehave:jbehave-gherkin:jar:4.0.3:compile
[INFO] | \- info.cukes:gherkin:jar:2.11.2:compile
[INFO] +- nz.co.*****:*****-server-plugins:jar:0.0.1-SNAPSHOT:test
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.26:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.26:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.26:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.26:compile
[INFO] | +- commons-codec:commons-codec:jar:1.6: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
Does anybody have any idea on how to solve this? Does anybody see anything amiss?
I solved this in the end. I was importing the wrong version of spring-data-commons.