Hi,I forgot to mention that this was tested with Maven 3.9.13 and Java 25 (Temurin 25.0.2 to be precise) on Windows 11 if that matters.
/Thorsten Am 12.03.26 um 10:32 schrieb Thorsten Heit:
Hi,I have asked this on the Solr mailing list before, but got no helpful answer so far. I hope someone here as a glue what's going on:I have written an internal library that uses SolrJ for connecting to a (remote) Solr server. The library is a multi-module project consisting of several parts; the interesting ones are:- a common module that represents the bridge to Solr (by using SolrJ)- a test module that implements JUnit tests and an integration test; uses jetty-maven-plugin to start a local Solr server with an empty database before the IT is executedActually I'm using the following dependencies in the IT module pom (unnecessary parts omitted):<dependencies> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> </dependency> <dependency> <groupId>${project.groupId}</groupId> <!-- bridge to connect to Solr: --> <artifactId>solr-connector-common</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-core</artifactId> <version>${solr.version}</version> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-params</artifactId> <scope>test</scope> </dependency> </dependencies> (the property "solr.version" is defined in the parent pom) With solr-core-9.10.1 "mvn dependency:tree" gives me (...) [INFO] +- org.apache.solr:solr-core:jar:9.10.1:compile [INFO] | +- org.apache.lucene:lucene-core:jar:9.12.2:compile [INFO] | +- org.apache.lucene:lucene-analysis-common:jar:9.12.2:compile [INFO] | +- org.apache.lucene:lucene-queries:jar:9.12.3:compile (...) [INFO] | \- org.xerial.snappy:snappy-java:jar:1.1.10.8:runtime [INFO] +- org.eclipse.jdt:org.eclipse.jdt.annotation:jar:2.4.100:provided [INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:6.0.3:test [INFO] | +- org.junit.platform:junit-platform-engine:jar:6.0.3:test [INFO] | | +- org.opentest4j:opentest4j:jar:1.3.0:test [INFO] | | \- org.junit.platform:junit-platform-commons:jar:6.0.3:test [INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:6.0.3:test [INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.2:test [INFO] | \- org.jspecify:jspecify:jar:1.0.0:runtime [INFO] \- org.junit.jupiter:junit-jupiter-params:jar:6.0.3:test (...) What puzzles me that the same command with solr-core-10.0.0 only shows (...) [INFO] +- org.apache.solr:solr-core:jar:10.0.0:compile [INFO] +- org.eclipse.jdt:org.eclipse.jdt.annotation:jar:2.4.100:provided [INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:6.0.3:test [INFO] | +- org.junit.platform:junit-platform-engine:jar:6.0.3:test [INFO] | | +- org.opentest4j:opentest4j:jar:1.3.0:test [INFO] | | \- org.junit.platform:junit-platform-commons:jar:6.0.3:test [INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:6.0.3:test [INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.2:test [INFO] | \- org.jspecify:jspecify:jar:1.0.0:runtime [INFO] \- org.junit.jupiter:junit-jupiter-params:jar:6.0.3:test (...)i.e. no dependencies at all in solr-core-10.0.0 in the tree. Therefore the IT test fails with ClassNotFoundExceptions when Jetty starts the local server:(...)[WARNING] Failed startup of context oeje10mp.MavenWebAppContext@54bd2345{/solr,/solr,b=file:///(...)/solr- connector-tests/src/main/ webapp/,a=STOPPED,h=oeje10s.SessionHandler@10897221{STOPPED}}{file:/// (...)/solr-connector-tests/src/main/webapp/} java.lang.NoClassDefFoundError: org/apache/solr/common/cloud/ ClusterPropertiesListenerat java.lang.Class.getDeclaredConstructors0 (Native Method) at java.lang.Class.privateGetDeclaredConstructors (Class.java:2985) at java.lang.Class.getConstructor0 (Class.java:3180) at java.lang.Class.getDeclaredConstructor (Class.java:2491)at org.eclipse.jetty.ee10.servlet.ServletContextHandler$ServletScopedContext.createInstance (ServletContextHandler.java:2023) at org.eclipse.jetty.ee10.servlet.BaseHolder.createInstance (BaseHolder.java:203)(...) But:When you look at the pom of solr-core-10.0.0 there are indeed lots of dependencies; if I counted correctly 76 in sum, 9 having scope "compiled" and 67 with scope "runtime". Additionally the poms of solr-core-9.10.1 and solr-core-10.0.0 don't differ much. The dependencies are basically the same, some with newer versions; a few removed, a few added IIRC.To make the IT work again I manually have to add about a third of the dependencies defined in solr-core-10.0.0 such as org.apache.solr:solr- solrj, org.apache.solr:solr-solrj-zookeeper, tons of lucene dependencies etc.Has somehere a clue why this is necessary? Regards Thorsten
OpenPGP_0x5A54BBB878225E08.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
