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.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
As per the document shared, they are also using the old client :
private static HttpSolrClient getClient() {
return new HttpSolrClient.Builder().withBaseSolrUrl("http://localhost:8983/solr")
.build();
}
which has been deprecated as per Solrj 9.0.0 - https://solr.apache.org/docs/9_0_0/solrj/deprecated-list.html
I want to connect using the new Http2SolrClient as per the latest standard.
@acgurnani Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hello @kautuk_sahni
I still have no solution for the above, even reducing to 8.X version of Solr I wasn't able to find the solution.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies