SolrJ 9.3.0 Upgrade issues

309 Views Asked by At

I'm trying to upgrade current projects to SolrJ 9.3.0. To give you context we have a general indexing library that has dependency on SolrJ and concrete implementation of this lib to support indexing of different documents.

When I upgraded SolrJ from 8.11.2 to 9.3.0, different issues occurred. Mainly, tests are failing because of transitive dependency classes aren't found, then in the concrete implementation project, it picks up 8.11.2 again instead of 9.3.0. I've cleaned up .m2 repository but it again fetched 8.11.2. Then we tried to another machine but same behaviour happened there. I'll list all dependencies, dependency tree and issues that occurred.

Thanks

Indexing Lib dependencies:

pom.xml URL for indexing lib

Indexing Lib Dependency Tree:

[INFO] --- maven-dependency-plugin:3.3.0:tree (default-cli) @ search-solr-indexing-lib ---
[INFO] com.xxx.search:search-solr-indexing-lib:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.7.15:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.7.15:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.3.29:compile
[INFO] |  |     +- org.springframework:spring-beans:jar:5.3.29:compile
[INFO] |  |     \- org.springframework:spring-expression:jar:5.3.29:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.7.15:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.7.15:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.12:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.12:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.17.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.17.2:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.36:compile
[INFO] |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  +- org.springframework:spring-core:jar:5.3.29:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.3.29:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.7.15:compile
[INFO] |  +- org.springframework.data:spring-data-redis:jar:2.7.15:compile
[INFO] |  |  +- org.springframework.data:spring-data-keyvalue:jar:2.7.15:compile
[INFO] |  |  |  \- org.springframework.data:spring-data-commons:jar:2.7.15:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:5.3.29:compile
[INFO] |  |  +- org.springframework:spring-oxm:jar:5.3.29:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:5.3.29:compile
[INFO] |  |  \- org.springframework:spring-context-support:jar:5.3.29:compile
[INFO] |  \- io.lettuce:lettuce-core:jar:6.1.10.RELEASE:compile
[INFO] |     +- io.netty:netty-common:jar:4.1.97.Final:compile
[INFO] |     +- io.netty:netty-handler:jar:4.1.97.Final:compile
[INFO] |     |  +- io.netty:netty-resolver:jar:4.1.97.Final:compile
[INFO] |     |  \- io.netty:netty-transport-native-unix-common:jar:4.1.97.Final:compile
[INFO] |     +- io.netty:netty-transport:jar:4.1.97.Final:compile
[INFO] |     \- io.projectreactor:reactor-core:jar:3.4.32:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.7.15:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.7.15:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.7.15:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.7.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.4.11:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:2.4.11:test
[INFO] |  |        \- org.ow2.asm:asm:jar:9.3:test
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] |  +- org.assertj:assertj-core:jar:3.22.0:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.8.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |  |  +- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] |  |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.8.2:test
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.8.2:test
[INFO] |  |     \- org.junit.platform:junit-platform-engine:jar:1.8.2:test
[INFO] |  +- org.mockito:mockito-core:jar:4.5.1:test
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.12.23:test
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.12.23:test
[INFO] |  |  \- org.objenesis:objenesis:jar:3.2:test
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:4.5.1:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.3.29:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.9.1:test
[INFO] +- com.google.code.gson:gson:jar:2.10.1:compile
[INFO] +- io.github.resilience4j:resilience4j-retry:jar:1.7.1:compile
[INFO] |  +- io.vavr:vavr:jar:0.10.2:compile
[INFO] |  |  \- io.vavr:vavr-match:jar:0.10.2:compile
[INFO] |  +- io.github.resilience4j:resilience4j-core:jar:1.7.1:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] +- org.apache.solr:solr-solrj:jar:9.3.0:compile
[INFO] |  +- org.eclipse.jetty.http2:http2-client:jar:9.4.51.v20230217:compile
[INFO] |  |  +- org.eclipse.jetty.http2:http2-common:jar:9.4.51.v20230217:compile
[INFO] |  |  |  \- org.eclipse.jetty.http2:http2-hpack:jar:9.4.51.v20230217:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-alpn-client:jar:9.4.51.v20230217:compile
[INFO] |  +- org.apache.httpcomponents:httpmime:jar:4.5.14:compile
[INFO] |  +- org.eclipse.jetty.http2:http2-http-client-transport:jar:9.4.51.v20230217:runtime
[INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.4.51.v20230217:compile
[INFO] |  +- org.eclipse.jetty:jetty-client:jar:9.4.51.v20230217:runtime
[INFO] |  +- org.eclipse.jetty:jetty-util:jar:9.4.51.v20230217:compile
[INFO] |  +- org.eclipse.jetty:jetty-io:jar:9.4.51.v20230217:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.15:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] |  +- org.eclipse.jetty:jetty-alpn-java-client:jar:9.4.51.v20230217:runtime
[INFO] |  +- org.apache.solr:solr-solrj-streaming:jar:9.3.0:runtime
[INFO] |  |  \- org.apache.commons:commons-math3:jar:3.6.1:runtime
[INFO] |  \- org.apache.solr:solr-solrj-zookeeper:jar:9.3.0:runtime
[INFO] |     +- org.apache.zookeeper:zookeeper:jar:3.8.1:runtime
[INFO] |     |  \- io.netty:netty-transport-native-epoll:jar:4.1.97.Final:runtime
[INFO] |     \- org.apache.zookeeper:zookeeper-jute:jar:3.8.1:runtime
[INFO] +- software.amazon.awssdk:s3:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:aws-xml-protocol:jar:2.15.0:compile
[INFO] |  |  \- software.amazon.awssdk:aws-query-protocol:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:protocol-core:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:arns:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:profiles:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:sdk-core:jar:2.15.0:compile
[INFO] |  |  \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO] |  +- software.amazon.awssdk:http-client-spi:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:regions:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:annotations:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:utils:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:aws-core:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:metrics-spi:jar:2.15.0:compile
[INFO] |  +- software.amazon.awssdk:apache-client:jar:2.15.0:runtime
[INFO] |  \- software.amazon.awssdk:netty-nio-client:jar:2.15.0:runtime
[INFO] |     +- io.netty:netty-codec-http:jar:4.1.97.Final:runtime
[INFO] |     +- io.netty:netty-codec-http2:jar:4.1.97.Final:runtime
[INFO] |     +- io.netty:netty-codec:jar:4.1.97.Final:compile
[INFO] |     +- io.netty:netty-buffer:jar:4.1.97.Final:compile
[INFO] |     +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.97.Final:runtime
[INFO] |     |  \- io.netty:netty-transport-classes-epoll:jar:4.1.97.Final:runtime
[INFO] |     \- com.typesafe.netty:netty-reactive-streams-http:jar:2.0.4:runtime
[INFO] |        \- com.typesafe.netty:netty-reactive-streams:jar:2.0.4:runtime
[INFO] +- software.amazon.awssdk:auth:jar:2.15.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.5:compile
[INFO] |  \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO] +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- redis.clients:jedis:jar:3.9.0:compile
[INFO] |  \- org.apache.commons:commons-pool2:jar:2.11.1:compile
[INFO] +- com.joyent.util:fast-md5:jar:2.7.1:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.15.2:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.5:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.15.2:compile
[INFO] |  +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] |  \- com.fasterxml.woodstox:woodstox-core:jar:6.5.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.15.2:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.13.0:compile
[INFO] +- commons-io:commons-io:jar:2.13.0:compile
[INFO] +- com.google.api-client:google-api-client:jar:2.0.0:compile
[INFO] |  +- com.google.oauth-client:google-oauth-client:jar:1.34.1:compile
[INFO] |  +- com.google.http-client:google-http-client-gson:jar:1.42.1:compile
[INFO] |  +- com.google.guava:guava:jar:31.1-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] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.11.0:compile
[INFO] |  |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  +- com.google.http-client:google-http-client-apache-v2:jar:1.42.1:compile
[INFO] |  \- com.google.http-client:google-http-client:jar:1.42.1:compile
[INFO] |     +- io.opencensus:opencensus-api:jar:0.31.1:compile
[INFO] |     |  \- io.grpc:grpc-context:jar:1.27.2:compile
[INFO] |     \- io.opencensus:opencensus-contrib-http-util:jar:0.31.1:compile
[INFO] +- com.google.oauth-client:google-oauth-client-jetty:jar:1.34.1:compile
[INFO] |  \- com.google.oauth-client:google-oauth-client-java6:jar:1.34.1:compile
[INFO] +- com.google.apis:google-api-services-sheets:jar:v4-rev20220927-2.0.0:compile
[INFO] +- com.google.auth:google-auth-library-oauth2-http:jar:1.19.0:compile
[INFO] |  +- com.google.auto.value:auto-value-annotations:jar:1.10.1:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  \- com.google.auth:google-auth-library-credentials:jar:1.19.0:compile
[INFO] +- com.oracle.database.jdbc:ojdbc10:jar:19.20.0.0:compile
[INFO] +- org.postgresql:postgresql:jar:42.6.0:compile
[INFO] |  \- org.checkerframework:checker-qual:jar:3.31.0:compile
[INFO] +- org.testcontainers:postgresql:jar:1.18.0:test
[INFO] |  \- org.testcontainers:jdbc:jar:1.18.0:test
[INFO] |     \- org.testcontainers:database-commons:jar:1.18.0:test
[INFO] |        \- org.testcontainers:testcontainers:jar:1.18.0:test
[INFO] |           +- junit:junit:jar:4.13.2:test
[INFO] |           |  \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] |           +- org.apache.commons:commons-compress:jar:1.22:test
[INFO] |           +- org.rnorth.duct-tape:duct-tape:jar:1.0.8:test
[INFO] |           |  \- org.jetbrains:annotations:jar:17.0.0:test
[INFO] |           +- com.github.docker-java:docker-java-api:jar:3.3.0:test
[INFO] |           \- com.github.docker-java:docker-java-transport-zerodep:jar:3.3.0:test
[INFO] |              +- com.github.docker-java:docker-java-transport:jar:3.3.0:test
[INFO] |              \- net.java.dev.jna:jna:jar:5.12.1:test
[INFO] \- org.testcontainers:oracle-xe:jar:1.19.0:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.643 s
[INFO] Finished at: 2023-09-25T20:01:50+04:00
[INFO] ------------------------------------------------------------------------

Indexing Lib Issues while running "mvn clean install"

Underlying exception : java.lang.IllegalArgumentException: Could not create type
    at com.XXX.search.service.SolrServiceImplTest.init(SolrServiceImplTest.java:41)
Caused by: java.lang.IllegalArgumentException: Could not create type
    at com.XXX.search.service.SolrServiceImplTest.init(SolrServiceImplTest.java:41)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpFields$Mutable
    at com.XXX.search.service.SolrServiceImplTest.init(SolrServiceImplTest.java:41)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpFields$Mutable
    at com.xxx.search.service.SolrServiceImplTest.init(SolrServiceImplTest.java:41)
[ERROR] test_canRetryAddDocumentsIfStatusIsNonZero  Time elapsed: 0.004 s  <<< ERROR!
org.mockito.exceptions.base.MockitoException: 
Mockito cannot mock this class: class org.apache.solr.client.solrj.impl.Http2SolrClient.
Mockito can only mock non-private & non-final classes.
If you're not sure why you're getting this error, please report to the mailing list.
Java               : 17
JVM vendor name    : Amazon.com Inc.
JVM vendor version : 17.0.8.1+8-LTS
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 17.0.8.1+8-LTS
JVM info           : mixed mode, sharing
OS name            : Windows 11
OS version         : 10.0

Now let's say that I'm not running the tests and able to build the project to check it's usage in concrete implementation of indexing job.

Concrete indexing job pom POM Link

It's dependency tree says that the lib uses 8.11.2 when I have put 9.3.0 in pom and even lib recognizes 9.3.0 :) .m2 repo was cleaned and I've build lib with 0.0.2-SNAPSHOT version that is even not in artifactory.. Here is dependency tree:

[INFO] --- maven-dependency-plugin:3.3.0:tree (default-cli) @ search-solr-indexing-rq ---
[INFO] com.xxx.search:search-solr-indexing-rq:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.7.15:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.7.15:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.3.29:compile
[INFO] |  |     +- org.springframework:spring-aop:jar:5.3.29:compile
[INFO] |  |     +- org.springframework:spring-beans:jar:5.3.29:compile
[INFO] |  |     \- org.springframework:spring-expression:jar:5.3.29:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.7.15:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.7.15:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.12:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.12:compile
[INFO] |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.17.2:compile
[INFO] |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.17.2:compile
[INFO] |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.36:compile
[INFO] |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  +- org.springframework:spring-core:jar:5.3.29:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.3.29:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.7.15:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.7.15:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.7.15:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.7.0:test
[INFO] |  |  +- net.minidev:json-smart:jar:2.4.11:test
[INFO] |  |  |  \- net.minidev:accessors-smart:jar:2.4.11:test
[INFO] |  |  |     \- org.ow2.asm:asm:jar:9.3:test
[INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] |  +- org.assertj:assertj-core:jar:3.22.0:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.8.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] |  |  |  +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |  |  +- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] |  |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] |  |  +- org.junit.jupiter:junit-jupiter-params:jar:5.8.2:test
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.8.2:test
[INFO] |  |     \- org.junit.platform:junit-platform-engine:jar:1.8.2:test
[INFO] |  +- org.mockito:mockito-core:jar:4.5.1:test
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.12.23:test
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.12.23:test
[INFO] |  |  \- org.objenesis:objenesis:jar:3.2:test
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:4.5.1:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.3.29:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.9.1:test
[INFO] \- com.xxx.search:search-solr-indexing-lib:jar:0.0.2-SNAPSHOT:compile
[INFO]    +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.7.15:compile
[INFO]    |  +- org.springframework.data:spring-data-redis:jar:2.7.15:compile
[INFO]    |  |  +- org.springframework.data:spring-data-keyvalue:jar:2.7.15:compile
[INFO]    |  |  |  \- org.springframework.data:spring-data-commons:jar:2.7.15:compile
[INFO]    |  |  +- org.springframework:spring-tx:jar:5.3.29:compile
[INFO]    |  |  +- org.springframework:spring-oxm:jar:5.3.29:compile
[INFO]    |  |  \- org.springframework:spring-context-support:jar:5.3.29:compile
[INFO]    |  \- io.lettuce:lettuce-core:jar:6.1.10.RELEASE:compile
[INFO]    |     \- io.projectreactor:reactor-core:jar:3.4.32:compile
[INFO]    +- com.google.code.gson:gson:jar:2.9.1:compile
[INFO]    +- io.github.resilience4j:resilience4j-retry:jar:1.7.1:compile
[INFO]    |  +- io.vavr:vavr:jar:0.10.2:compile
[INFO]    |  |  \- io.vavr:vavr-match:jar:0.10.2:compile
[INFO]    |  \- io.github.resilience4j:resilience4j-core:jar:1.7.1:compile
[INFO]    +- org.apache.solr:solr-solrj:jar:8.11.2:compile
[INFO]    |  +- com.fasterxml.woodstox:woodstox-core:jar:6.2.4:compile
[INFO]    |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO]    |  +- io.netty:netty-buffer:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-codec:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-common:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-handler:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-resolver:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-transport:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-transport-native-epoll:jar:4.1.97.Final:compile
[INFO]    |  |  \- io.netty:netty-transport-classes-epoll:jar:4.1.97.Final:compile
[INFO]    |  +- io.netty:netty-transport-native-unix-common:jar:4.1.97.Final:compile
[INFO]    |  +- org.apache.commons:commons-math3:jar:3.6.1:compile
[INFO]    |  +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO]    |  +- org.apache.httpcomponents:httpmime:jar:4.5.14:compile
[INFO]    |  +- org.apache.zookeeper:zookeeper:jar:3.6.2:compile
[INFO]    |  +- org.apache.zookeeper:zookeeper-jute:jar:3.6.2:compile
[INFO]    |  +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO]    |  +- org.eclipse.jetty:jetty-alpn-client:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty:jetty-alpn-java-client:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty:jetty-client:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty:jetty-http:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty:jetty-io:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty:jetty-util:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty.http2:http2-client:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty.http2:http2-common:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty.http2:http2-hpack:jar:9.4.51.v20230217:compile
[INFO]    |  +- org.eclipse.jetty.http2:http2-http-client-transport:jar:9.4.51.v20230217:compile
[INFO]    |  \- org.xerial.snappy:snappy-java:jar:1.1.7.6:compile
[INFO]    +- software.amazon.awssdk:s3:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:aws-xml-protocol:jar:2.15.0:compile
[INFO]    |  |  \- software.amazon.awssdk:aws-query-protocol:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:protocol-core:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:arns:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:profiles:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:sdk-core:jar:2.15.0:compile
[INFO]    |  |  \- org.reactivestreams:reactive-streams:jar:1.0.4:compile
[INFO]    |  +- software.amazon.awssdk:http-client-spi:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:regions:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:annotations:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:utils:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:aws-core:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:metrics-spi:jar:2.15.0:compile
[INFO]    |  +- software.amazon.awssdk:apache-client:jar:2.15.0:runtime
[INFO]    |  \- software.amazon.awssdk:netty-nio-client:jar:2.15.0:runtime
[INFO]    |     +- io.netty:netty-codec-http:jar:4.1.97.Final:runtime
[INFO]    |     +- io.netty:netty-codec-http2:jar:4.1.97.Final:runtime
[INFO]    |     +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.97.Final:runtime
[INFO]    |     \- com.typesafe.netty:netty-reactive-streams-http:jar:2.0.4:runtime
[INFO]    |        \- com.typesafe.netty:netty-reactive-streams:jar:2.0.4:runtime
[INFO]    +- software.amazon.awssdk:auth:jar:2.15.0:compile
[INFO]    |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.5:compile
[INFO]    |  \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO]    +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO]    +- redis.clients:jedis:jar:3.8.0:compile
[INFO]    |  \- org.apache.commons:commons-pool2:jar:2.11.1:compile
[INFO]    +- com.joyent.util:fast-md5:jar:2.7.1:compile
[INFO]    +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.5:compile
[INFO]    |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.5:compile
[INFO]    +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.13.5:compile
[INFO]    +- com.fasterxml.jackson.core:jackson-core:jar:2.13.5:compile
[INFO]    +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO]    +- commons-io:commons-io:jar:2.13.0:compile
[INFO]    +- com.google.api-client:google-api-client:jar:2.0.0:compile
[INFO]    |  +- com.google.oauth-client:google-oauth-client:jar:1.34.1:compile
[INFO]    |  +- com.google.http-client:google-http-client-gson:jar:1.42.1:compile
[INFO]    |  +- com.google.guava:guava:jar:31.1-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]    |  |  +- com.google.errorprone:error_prone_annotations:jar:2.11.0:compile
[INFO]    |  |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO]    |  +- com.google.http-client:google-http-client-apache-v2:jar:1.42.1:compile
[INFO]    |  \- com.google.http-client:google-http-client:jar:1.42.1:compile
[INFO]    |     +- io.opencensus:opencensus-api:jar:0.31.1:compile
[INFO]    |     |  \- io.grpc:grpc-context:jar:1.27.2:compile
[INFO]    |     \- io.opencensus:opencensus-contrib-http-util:jar:0.31.1:compile
[INFO]    +- com.google.oauth-client:google-oauth-client-jetty:jar:1.34.1:compile
[INFO]    |  \- com.google.oauth-client:google-oauth-client-java6:jar:1.34.1:compile
[INFO]    +- com.google.apis:google-api-services-sheets:jar:v4-rev20220927-2.0.0:compile
[INFO]    +- com.google.auth:google-auth-library-oauth2-http:jar:1.19.0:compile
[INFO]    |  +- com.google.auto.value:auto-value-annotations:jar:1.10.1:compile
[INFO]    |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO]    |  \- com.google.auth:google-auth-library-credentials:jar:1.19.0:compile
[INFO]    +- com.oracle.database.jdbc:ojdbc10:jar:19.20.0.0:compile
[INFO]    \- org.postgresql:postgresql:jar:42.3.8:compile
[INFO]       \- org.checkerframework:checker-qual:jar:3.5.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.501 s
[INFO] Finished at: 2023-09-25T20:12:06+04:00
[INFO] ------------------------------------------------------------------------

And then on runtime we get this error

java.lang.NoSuchMethodError: 'org.apache.solr.client.solrj.impl.Http2SolrClient$Builder org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.withResponseParser(org.apache.solr.client.solrj.ResponseParser)'
    at com.xxx.search.service.impl.SolrServiceImpl.initSolrClient(SolrServiceImpl.java:144) ~[search-solr-indexing-lib-0.0.2-SNAPSHOT.jar:0.0.2-SNAPSHOT]
    at com.xxx.search.service.impl.SolrServiceImpl.<init>(SolrServiceImpl.java:38) ~[search-solr-indexing-lib-0.0.2-SNAPSHOT.jar:0.0.2-SNAPSHOT]
    at com.xxx.search.util.SolrServiceFactory.lambda$getSolrServices$0(SolrServiceFactory.java:26) ~[search-solr-indexing-lib-0.0.2-SNAPSHOT.jar:0.0.2-SNAPSHOT]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]
    at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[na:na]
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) ~[na:na]
    at com.xxx.search.util.SolrServiceFactory.lambda$getSolrServices$1(SolrServiceFactory.java:26) ~[search-solr-indexing-lib-0.0.2-SNAPSHOT.jar:0.0.2-SNAPSHOT]
    at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134) ~[na:na]
    at com.xxx.search.util.SolrServiceFactory.getSolrServices(SolrServiceFactory.java:26) ~[search-solr-indexing-lib-0.0.2-SNAPSHOT.jar:0.0.2-SNAPSHOT]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[na:na]

I've tried to add transitive dependencies manually but issue is still there.

[Transitive dependency list](https://pastebin.com/47zJatcm)
0

There are 0 best solutions below