0

After upgrading to Spring Boot 2.2.4, I have a strange compilation error:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jacksonObjectMapper' defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.databind.ObjectMapper]: Factory method 'jacksonObjectMapper' threw exception; nested exception is java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)[Ljava/lang/Object;

I have no scala dependency in my classpath.

Running a gradlew dependencies --configurationruntimeClasspath gives me:


> Task :dependencies

------------------------------------------------------------
Root project
------------------------------------------------------------

runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.scala-lang:scala-library -> 2.12.10
+--- org.springframework.boot:spring-boot-starter-webflux -> 2.2.4.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot:2.2.4.RELEASE
|    |    |    +--- org.springframework:spring-core:5.2.3.RELEASE
|    |    |    |    \--- org.springframework:spring-jcl:5.2.3.RELEASE
|    |    |    \--- org.springframework:spring-context:5.2.3.RELEASE
|    |    |         +--- org.springframework:spring-aop:5.2.3.RELEASE
|    |    |         |    +--- org.springframework:spring-beans:5.2.3.RELEASE
|    |    |         |    |    \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    |         |    \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    |         +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    |         +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    |         \--- org.springframework:spring-expression:5.2.3.RELEASE
|    |    |              \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE
|    |    |    \--- org.springframework.boot:spring-boot:2.2.4.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE
|    |    |    +--- ch.qos.logback:logback-classic:1.2.3
|    |    |    |    +--- ch.qos.logback:logback-core:1.2.3
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    |    +--- org.apache.logging.log4j:log4j-to-slf4j:2.12.1
|    |    |    |    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    |    |    \--- org.apache.logging.log4j:log4j-api:2.12.1
|    |    |    \--- org.slf4j:jul-to-slf4j:1.7.30
|    |    |         \--- org.slf4j:slf4j-api:1.7.30
|    |    +--- jakarta.annotation:jakarta.annotation-api:1.3.5
|    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    \--- org.yaml:snakeyaml:1.25
|    +--- org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    |    +--- org.springframework:spring-web:5.2.3.RELEASE
|    |    |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    |    \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
|    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2
|    |         +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |         \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    +--- org.springframework.boot:spring-boot-starter-reactor-netty:2.2.4.RELEASE
|    |    +--- io.projectreactor.netty:reactor-netty:0.9.4.RELEASE
|    |    |    +--- io.netty:netty-codec-http:4.1.44.Final -> 4.1.45.Final
|    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final
|    |    |    |    |    \--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-transport:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    |    \--- io.netty:netty-resolver:4.1.45.Final
|    |    |    |    |         \--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-codec:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    |    \--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |    \--- io.netty:netty-handler:4.1.45.Final
|    |    |    |         +--- io.netty:netty-common:4.1.45.Final
|    |    |    |         +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |         +--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |         \--- io.netty:netty-codec:4.1.45.Final (*)
|    |    |    +--- io.netty:netty-codec-http2:4.1.44.Final -> 4.1.45.Final
|    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-codec:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-handler:4.1.45.Final (*)
|    |    |    |    \--- io.netty:netty-codec-http:4.1.45.Final (*)
|    |    |    +--- io.netty:netty-handler:4.1.44.Final -> 4.1.45.Final (*)
|    |    |    +--- io.netty:netty-handler-proxy:4.1.44.Final -> 4.1.45.Final
|    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-codec:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-codec-socks:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    |    +--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |    |    \--- io.netty:netty-codec:4.1.45.Final (*)
|    |    |    |    \--- io.netty:netty-codec-http:4.1.45.Final (*)
|    |    |    +--- io.netty:netty-transport-native-epoll:4.1.44.Final -> 4.1.45.Final
|    |    |    |    +--- io.netty:netty-common:4.1.45.Final
|    |    |    |    +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |    +--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    |    \--- io.netty:netty-transport-native-unix-common:4.1.45.Final
|    |    |    |         +--- io.netty:netty-common:4.1.45.Final
|    |    |    |         +--- io.netty:netty-buffer:4.1.45.Final (*)
|    |    |    |         \--- io.netty:netty-transport:4.1.45.Final (*)
|    |    |    \--- io.projectreactor:reactor-core:3.3.2.RELEASE
|    |    |         \--- org.reactivestreams:reactive-streams:1.0.3
|    |    \--- org.glassfish:jakarta.el:3.0.3
|    +--- org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    |    +--- jakarta.validation:jakarta.validation-api:2.0.2
|    |    \--- org.hibernate.validator:hibernate-validator:6.0.18.Final
|    |         +--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
|    |         \--- com.fasterxml:classmate:1.3.4 -> 1.5.1
|    +--- org.springframework:spring-web:5.2.3.RELEASE (*)
|    +--- org.springframework:spring-webflux:5.2.3.RELEASE
|    |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-web:5.2.3.RELEASE (*)
|    |    \--- io.projectreactor:reactor-core:3.3.2.RELEASE (*)
|    \--- org.synchronoss.cloud:nio-multipart-parser:1.1.0
|         +--- org.slf4j:slf4j-api:1.7.12 -> 1.7.30
|         \--- org.synchronoss.cloud:nio-stream-storage:1.1.3
|              \--- org.slf4j:slf4j-api:1.7.12 -> 1.7.30
+--- org.springframework.integration:spring-integration-webflux -> 5.2.3.RELEASE
|    +--- org.springframework.integration:spring-integration-http:5.2.3.RELEASE
|    |    \--- org.springframework.integration:spring-integration-core:5.2.3.RELEASE
|    |         +--- io.projectreactor:reactor-core:3.3.2.RELEASE (*)
|    |         +--- org.springframework.retry:spring-retry:1.2.5.RELEASE
|    |         +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
|    |         +--- org.springframework:spring-context:5.2.3.RELEASE (*)
|    |         +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |         +--- org.springframework:spring-messaging:5.2.3.RELEASE
|    |         |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |         |    \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |         \--- org.springframework:spring-tx:5.2.3.RELEASE
|    |              +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |              \--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    \--- org.springframework:spring-webflux:5.2.3.RELEASE (*)
+--- org.springframework.boot:spring-boot-starter-actuator -> 2.2.4.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    +--- org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot-actuator:2.2.4.RELEASE
|    |    |    +--- org.springframework.boot:spring-boot:2.2.4.RELEASE (*)
|    |    |    \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2 (*)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE (*)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-context:5.2.3.RELEASE (*)
|    |    \--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2 (*)
|    \--- io.micrometer:micrometer-core:1.3.2
|         +--- org.hdrhistogram:HdrHistogram:2.1.11
|         \--- org.latencyutils:LatencyUtils:2.0.3
+--- org.springframework.boot:spring-boot-starter-security -> 2.2.4.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
|    +--- org.springframework.security:spring-security-config:5.2.1.RELEASE
|    |    +--- org.springframework.security:spring-security-core:5.2.1.RELEASE
|    |    |    +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    |    \--- org.springframework:spring-expression:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    |    \--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|    \--- org.springframework.security:spring-security-web:5.2.1.RELEASE
|         +--- org.springframework.security:spring-security-core:5.2.1.RELEASE (*)
|         +--- org.springframework:spring-aop:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|         +--- org.springframework:spring-beans:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|         +--- org.springframework:spring-context:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|         +--- org.springframework:spring-core:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|         +--- org.springframework:spring-expression:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
|         \--- org.springframework:spring-web:5.2.1.RELEASE -> 5.2.3.RELEASE (*)
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.2.4.RELEASE
|    +--- org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    |    +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
|    |    \--- org.aspectj:aspectjweaver:1.9.5
|    +--- org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.2.4.RELEASE (*)
|    |    +--- com.zaxxer:HikariCP:3.4.2
|    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    \--- org.springframework:spring-jdbc:5.2.3.RELEASE
|    |         +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |         +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |         \--- org.springframework:spring-tx:5.2.3.RELEASE (*)
|    +--- jakarta.activation:jakarta.activation-api:1.2.1
|    +--- jakarta.persistence:jakarta.persistence-api:2.2.3
|    +--- jakarta.transaction:jakarta.transaction-api:1.3.3
|    +--- org.hibernate:hibernate-core:5.4.10.Final
|    |    +--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
|    |    +--- org.javassist:javassist:3.24.0-GA
|    |    +--- net.bytebuddy:byte-buddy:1.10.2 -> 1.10.6
|    |    +--- antlr:antlr:2.7.7
|    |    +--- org.jboss:jandex:2.1.1.Final
|    |    +--- com.fasterxml:classmate:1.5.1
|    |    +--- org.dom4j:dom4j:2.1.1
|    |    +--- org.hibernate.common:hibernate-commons-annotations:5.1.0.Final
|    |    |    \--- org.jboss.logging:jboss-logging:3.3.2.Final -> 3.4.1.Final
|    |    \--- org.glassfish.jaxb:jaxb-runtime:2.3.1 -> 2.3.2
|    |         +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
|    |         |    \--- jakarta.activation:jakarta.activation-api:1.2.1
|    |         +--- org.glassfish.jaxb:txw2:2.3.2
|    |         +--- com.sun.istack:istack-commons-runtime:3.0.8
|    |         |    \--- jakarta.activation:jakarta.activation-api:1.2.1
|    |         +--- org.jvnet.staxex:stax-ex:1.8.1
|    |         |    +--- jakarta.activation:jakarta.activation-api:1.2.1
|    |         |    \--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2 (*)
|    |         +--- com.sun.xml.fastinfoset:FastInfoset:1.2.16
|    |         \--- jakarta.activation:jakarta.activation-api:1.2.1
|    +--- org.springframework.data:spring-data-jpa:2.2.4.RELEASE
|    |    +--- org.springframework.data:spring-data-commons:2.2.4.RELEASE
|    |    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    |    \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    |    +--- org.springframework:spring-orm:5.2.3.RELEASE
|    |    |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    |    +--- org.springframework:spring-jdbc:5.2.3.RELEASE (*)
|    |    |    \--- org.springframework:spring-tx:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-context:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-aop:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-tx:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-beans:5.2.3.RELEASE (*)
|    |    +--- org.springframework:spring-core:5.2.3.RELEASE (*)
|    |    \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    \--- org.springframework:spring-aspects:5.2.3.RELEASE
|         +--- org.aspectj:aspectjweaver:1.9.5
|         \--- org.springframework:spring-orm:5.2.3.RELEASE (*)
+--- org.liquibase:liquibase-core -> 3.8.5
|    +--- javax.xml.bind:jaxb-api:2.3.0 -> 2.3.1
|    |    \--- javax.activation:javax.activation-api:1.2.0
|    +--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
|    \--- ch.qos.logback:logback-classic:1.2.3 (*)
+--- org.postgresql:postgresql -> 42.2.9
+--- net.javacrumbs.shedlock:shedlock-spring:2.3.0
|    +--- net.javacrumbs.shedlock:shedlock-core:2.3.0
|    |    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
|    +--- org.springframework:spring-context:5.0.6.RELEASE -> 5.2.3.RELEASE (*)
|    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
+--- net.javacrumbs.shedlock:shedlock-provider-jdbc-template:2.3.0
|    +--- net.javacrumbs.shedlock:shedlock-core:2.3.0 (*)
|    +--- org.springframework:spring-jdbc:5.0.6.RELEASE -> 5.2.3.RELEASE (*)
|    +--- net.javacrumbs.shedlock:shedlock-provider-jdbc-internal:2.3.0
|    |    +--- net.javacrumbs.shedlock:shedlock-core:2.3.0 (*)
|    |    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
|    \--- org.slf4j:slf4j-api:1.7.21 -> 1.7.30
+--- org.apache.commons:commons-lang3 -> 3.9
+--- com.fasterxml.jackson.module:jackson-module-afterburner -> 2.10.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    \--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
+--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations -> 2.10.2
|    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2 (*)
|    \--- jakarta.activation:jakarta.activation-api:1.2.1
+--- net.logstash.logback:logstash-logback-encoder:4.11
|    +--- ch.qos.logback:logback-core:1.2.3
|    \--- com.fasterxml.jackson.core:jackson-databind:2.8.9 -> 2.10.2 (*)
+--- io.sentry:sentry-logback:1.7.27
|    +--- io.sentry:sentry:1.7.27
|    |    +--- org.slf4j:slf4j-api:1.7.24 -> 1.7.30
|    |    \--- com.fasterxml.jackson.core:jackson-core:2.9.9 -> 2.10.2
|    +--- org.slf4j:slf4j-api:1.7.24 -> 1.7.30
|    +--- ch.qos.logback:logback-core:1.2.1 -> 1.2.3
|    \--- ch.qos.logback:logback-classic:1.2.1 -> 1.2.3 (*)
+--- io.springfox:springfox-swagger2:3.0.0-SNAPSHOT
|    +--- io.swagger:swagger-annotations:1.5.20
|    +--- io.swagger:swagger-models:1.5.20
|    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.9.5 -> 2.10.2
|    |    +--- org.slf4j:slf4j-api:1.7.22 -> 1.7.30
|    |    \--- io.swagger:swagger-annotations:1.5.20
|    +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT
|    |    \--- io.springfox:springfox-core:3.0.0-SNAPSHOT
|    |         +--- net.bytebuddy:byte-buddy:1.9.10 -> 1.10.6
|    |         +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    |         +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |         +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE
|    |         |    +--- org.springframework:spring-beans:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
|    |         |    +--- org.springframework:spring-context:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
|    |         |    +--- org.springframework:spring-aop:5.2.0.RELEASE -> 5.2.3.RELEASE (*)
|    |         |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |         \--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE
|    |              +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    |              \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    +--- io.springfox:springfox-schema:3.0.0-SNAPSHOT
|    |    +--- io.springfox:springfox-core:3.0.0-SNAPSHOT (*)
|    |    \--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|    +--- io.springfox:springfox-swagger-common:3.0.0-SNAPSHOT
|    |    +--- io.swagger:swagger-annotations:1.5.20
|    |    +--- io.swagger:swagger-models:1.5.20 (*)
|    |    +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|    |    +--- io.springfox:springfox-schema:3.0.0-SNAPSHOT (*)
|    |    +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT
|    |    |    +--- io.github.classgraph:classgraph:4.1.7
|    |    |    +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    |    |    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    |    +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    |    |    +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|    |    |    \--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|    |    +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    |    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    |    \--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|    +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
|    +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|    \--- org.mapstruct:mapstruct:1.3.0.Final
+--- io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT
|    +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|    +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|    \--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
+--- io.springfox:springfox-spring-integration-webflux:3.0.0-SNAPSHOT
|    +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|    +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|    +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|    +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
|    +--- io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT (*)
|    \--- io.springfox:springfox-spring-integration:3.0.0-SNAPSHOT
|         +--- com.fasterxml:classmate:1.4.0 -> 1.5.1
|         +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|         +--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
|         +--- org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE (*)
|         +--- io.springfox:springfox-spi:3.0.0-SNAPSHOT (*)
|         +--- io.springfox:springfox-spring-web:3.0.0-SNAPSHOT (*)
|         \--- com.athaydes.rawhttp:rawhttp-core:2.0
+--- io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT
+--- org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE (*)
+--- org.springframework.kafka:spring-kafka -> 2.4.1.RELEASE
|    +--- org.apache.kafka:kafka-clients:2.4.0
|    |    +--- com.github.luben:zstd-jni:1.4.3-1
|    |    +--- org.lz4:lz4-java:1.6.0
|    |    +--- org.xerial.snappy:snappy-java:1.1.7.3
|    |    \--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
|    +--- org.springframework.retry:spring-retry:1.2.4.RELEASE -> 1.2.5.RELEASE
|    +--- org.springframework:spring-context:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
|    +--- org.springframework:spring-messaging:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
|    \--- org.springframework:spring-tx:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
+--- org.springframework.kafka:spring-kafka-test -> 2.4.1.RELEASE
|    +--- org.apache.kafka:kafka-clients:2.4.0 (*)
|    +--- org.apache.kafka:kafka-streams:2.4.0 -> 2.3.1
|    |    +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
|    |    +--- org.apache.kafka:connect-json:2.3.1
|    |    |    +--- org.apache.kafka:connect-api:2.3.1
|    |    |    |    +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.0 -> 2.10.2 (*)
|    |    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.0 -> 2.10.2 (*)
|    |    |    \--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    |    +--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    |    \--- org.rocksdb:rocksdbjni:5.18.3
|    +--- org.apache.kafka:kafka-streams-test-utils:2.4.0 -> 2.3.1
|    |    +--- org.apache.kafka:kafka-streams:2.3.1 (*)
|    |    \--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
|    +--- org.apache.kafka:kafka_2.12:2.4.0 -> 2.3.1
|    |    +--- org.apache.kafka:kafka-clients:2.3.1 -> 2.4.0 (*)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.0 -> 2.10.2 (*)
|    |    +--- com.fasterxml.jackson.module:jackson-module-scala_2.12:2.10.0 -> 2.10.2
|    |    |    +--- org.scala-lang:scala-library:2.12.10
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    |    \--- com.fasterxml.jackson.module:jackson-module-paranamer:2.10.2
|    |    |         +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    |         \--- com.thoughtworks.paranamer:paranamer:2.8
|    |    +--- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.10.0 -> 2.10.2
|    |    |    +--- com.fasterxml.jackson.core:jackson-databind:2.10.2 (*)
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
|    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.10.2
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.0 -> 2.10.2 (*)
|    |    +--- net.sf.jopt-simple:jopt-simple:5.0.4
|    |    +--- com.yammer.metrics:metrics-core:2.2.0
|    |    |    \--- org.slf4j:slf4j-api:1.7.2 -> 1.7.30
|    |    +--- org.scala-lang:scala-library:2.12.8 -> 2.12.10
|    |    +--- org.scala-lang:scala-reflect:2.12.8
|    |    |    \--- org.scala-lang:scala-library:2.12.8 -> 2.12.10
|    |    +--- com.typesafe.scala-logging:scala-logging_2.12:3.9.0
|    |    |    +--- org.scala-lang:scala-library:2.12.4 -> 2.12.10
|    |    |    +--- org.scala-lang:scala-reflect:2.12.4 -> 2.12.8 (*)
|    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |    +--- org.slf4j:slf4j-api:1.7.26 -> 1.7.30
|    |    +--- com.101tec:zkclient:0.11
|    |    |    \--- org.slf4j:slf4j-api:1.6.1 -> 1.7.30
|    |    \--- org.apache.zookeeper:zookeeper:3.4.14
|    |         +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
|    |         +--- com.github.spotbugs:spotbugs-annotations:3.1.9
|    |         |    \--- com.google.code.findbugs:jsr305:3.0.2
|    |         \--- org.apache.yetus:audience-annotations:0.5.0
|    +--- org.junit.jupiter:junit-jupiter-api:5.5.2
|    |    +--- org.apiguardian:apiguardian-api:1.1.0
|    |    +--- org.opentest4j:opentest4j:1.2.0
|    |    \--- org.junit.platform:junit-platform-commons:1.5.2
|    |         \--- org.apiguardian:apiguardian-api:1.1.0
|    +--- org.springframework.retry:spring-retry:1.2.4.RELEASE -> 1.2.5.RELEASE
|    +--- org.springframework:spring-context:5.2.2.RELEASE -> 5.2.3.RELEASE (*)
|    \--- org.springframework:spring-test:5.2.2.RELEASE -> 5.2.3.RELEASE
|         \--- org.springframework:spring-core:5.2.3.RELEASE (*)
+--- org.apache.kafka:kafka-clients:2.4.0 (*)


(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed

WesternGun
  • 11,303
  • 6
  • 88
  • 157
  • You must have a Scala dependency, otherwise the class on which there's no such method would not have been loaded. I'd guess it's a transitive dependency of something that you do depend upon. Can you share your dependency tree (`./mvnw dependency:tree` or `./gradlew dependencies --configuration runtimeClasspath`)? – Andy Wilkinson Jan 21 '20 at 15:04
  • As per required, output of this command is added. – WesternGun Jan 21 '20 at 15:44
  • You have several Scala dependencies, both a direct one and some that are pulled in via Kafka. There appears to be a mixture of versions (2.3.1 and 2.4.0) which may be contributing to the problem. I'd recommend reviewing your `build.gradle` and tidying up your dependencies. If that doesn't help, please update the question with a [minimal, complete, and verifiable example](/help/mcve). – Andy Wilkinson Jan 21 '20 at 16:11
  • Yes you are right. I may post my solution but make yours and I will accept it. – WesternGun Jan 22 '20 at 17:56
  • https://stackoverflow.com/questions/75947449/run-a-scala-code-jar-appear-nosuchmethoderrorscala-predef-refarrayops – Dmytro Mitin Apr 07 '23 at 04:52

2 Answers2

1

You have several Scala dependencies, both a direct one and some that are pulled in via Kafka. There appears to be a mixture of versions (2.3.1 and 2.4.0) of Spring Kafka which may be contributing to the problem. I'd recommend reviewing your build.gradle and tidying up your dependencies so that you’re using a consistent set of versions.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242
0

Andy was right. We do have some problems of mixing dep versions. Details can be found here:

https://docs.spring.io/spring-kafka/reference/html/#deps-for-24x

Specifically, we do this:

dependencies {
    compile 'org.scala-lang:scala-library'
    compile ('org.springframework.kafka:spring-kafka-test') {
        exclude module: 'kafka_2.11'
    }
    compile 'org.apache.kafka:kafka-clients:2.4.0'
    compile 'org.apache.kafka:kafka-clients:2.4.0:test'
    compile 'org.apache.kafka:kafka_2.12:2.4.0'
    compile 'org.apache.kafka:kafka_2.12:2.4.0:test'
    ...
}
WesternGun
  • 11,303
  • 6
  • 88
  • 157