Solrj 9.3.0 integration with AEM 6.5, Http2SolrClient issue
Hi,
I'm looking to integrate AEM 6.5 with Solrj latest version (9.3.0).
I see everywhere the SolrClient used is via HttpSolrClient but as per latest 9.X updates , it has been deprecated and Http2SolrClient is being suggested, but I cant find any examples to use the same ..
If I try using the Http2SolrClient , I'm facing the below error when I'm building the same
Code :
new Http2SolrClient.Builder(solrUrl)
.withConnectionTimeout(9000, TimeUnit.MILLISECONDS)
.withIdleTimeout(9000, TimeUnit.MILLISECONDS)
.build();
Error :
12.10.2023 10:08:44.638 *ERROR* [[0:0:0:0:0:0:0:1] [1697085524636] GET /bin/solr HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.LinkageError: loader constraint violation for class org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2: when selecting overriding method org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2.newConnection(Lorg/eclipse/jetty/io/EndPoint;Ljava/util/Map;)Lorg/eclipse/jetty/io/Connection; the class loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @7afe802 (instance of org.apache.felix.framework.BundleWiringImpl$BundleClassLoader, child of org.apache.sling.launchpad.base.shared.LauncherClassLoader @338fc1d8 org.apache.sling.launchpad.base.shared.LauncherClassLoader) of the selected method's type org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2, and the class loader org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @6724aac0 (instance of org.apache.felix.framework.BundleWiringImpl$BundleClassLoader, child of org.apache.sling.launchpad.base.shared.LauncherClassLoader @338fc1d8 org.apache.sling.launchpad.base.shared.LauncherClassLoader) for its super type org.eclipse.jetty.client.AbstractHttpClientTransport have different Class objects for the type org.eclipse.jetty.io.EndPoint used in the signature
at org.apache.solr.client.solrj.impl.Http2SolrClient.createHttpClient(Http2SolrClient.java:262)
Deprecated List : https://solr.apache.org/docs/9_0_0/solrj/deprecated-list.html
All bundles are up and running.
Adobe Experience Manager, Version 6.5.17.0
Solrj version : 9.3.0
Getting success response when using deprecated HttpClient.
Please if anyone has any pointers for the same.