On 1/9/24 10:14, dario.v...@coop.ch wrote:
Hello Everyone at Solr
This Email is possibly a duplicate, but as I did not find my Mail appear in the
archives the first time I'm sending it a second time.
Today I wanted to bump the Spring Boot version from 3.1.7 to 3.2.1.
With the first Version my application just worked, but now I get the fallowing
Exception:
Failed to instantiate [org.apache.solr.client.solrj.SolrClient]: Factory method
'solrClient' threw exception with message:
org/eclipse/jetty/client/util/InputStreamResponseListener
The Problem is, that InputStreamResponseListener was moved to a new package.
org.eclipse.jetty.client.util to org.eclipse.jetty.client (without util).
SolrJ uses the Jetty Client version 10.
Spring Boot 3.2.1 updates all Jetty dependencies to version 12.0.5, and
neither Solr nor SolrJ has been qualified to work with Jetty 12.
I do not know what dependency manager you are using, but I found the way
to force Jetty dependencies to version 10 in gradle using a
"configurations" section:
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
}
group = 'org.elyograg.test'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
configurations {
all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group ==
'org.eclipse.jetty') {
details.useVersion '10+'
}
}
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation group: 'org.apache.solr', name: 'solr-solrj', version:
'9+'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
Thanks,
Shawn