Hello, Subhasis.
It might be wrong direction, but is there a chance you may use SolrJ 8 to
connect to Solr 9.4?
Otherwise this jar hell might be only resolved with shading jars or
isolating classloader.

On Tue, Jan 9, 2024 at 1:17 AM Subhasis Patra
<subhasis.pa...@e2open.com.invalid> wrote:

> Hi, I got the issue in Solrj upgrade.
> Nifi 1.23.2 or 1.24.0 uses jetty-http 9.4.51 jar where as Solrj 9.4 needs
> jetty-http 10.17. It means Solrj 9.x is not compatible with nifi 1.24.0.
> Nifi 2.0.0-M has 10,x version of jetty. But this uses java 21 and lot of
> methods are deprecated. So its not a straight forward change and
> problematic.
>
> Thanks
> Subhasis Patra
> 240-755-2601
> subhasis.pa...@e2open.com<mailto:subhasis.pa...@e2open.com>
>
> From: Jan Høydahl <jan....@cominvent.com>
> Sent: Monday, January 8, 2024 4:20 PM
> To: dev@solr.apache.org
> Subject: Re: Nifi error after Solrj Upgrade
>
> PHISH ALERT! CHECK VALIDITY IF CLICKING, SHARING, RESPONDING
>
> This is really a discussion for the users@ list, but you have to check
> all your transivite dependencies for conflicts.
> Here is a helpful article:
> https://www.javaadvent.com/2020/12/how-to-debug-dependency-conflicts-in-maven-and-gradle.html
> <
> https://www.javaadvent.com/2020/12/how-to-debug-dependency-conflicts-in-maven-and-gradle.html
> >
>
> Jan
>
> > 8. jan. 2024 kl. 18:08 skrev Subhasis Patra <subhasis.pa...@e2open.com
> .INVALID<mailto:subhasis.pa...@e2open.com.INVALID>>:
> >
> > Thank you for your response.
> > We don’t have any issue when Solrj is part of other services. The issue
> is specific to nifi. Is nifi using some different version of jetty that is
> conflicting with the jetty Solrj is using?
> > I don’t have any jetty in my pom, the jeety jars are getting pulled as
> part of Solrj or nifi.
> >
> > Thanks
> > Subhasis Patra
> > 240-755-2601
> > subhasis.pa...@e2open.com<mailto:subhasis.pa...@e2open.com<mailto:
> subhasis.pa...@e2open.com%3cmailto:subhasis.pa...@e2open.com>>
> >
> > From: Jan Høydahl <jan....@cominvent.com<mailto:jan....@cominvent.com>>
> > Sent: Monday, January 8, 2024 8:41 AM
> > To: dev@solr.apache.org<mailto:dev@solr.apache.org>
> > Subject: Re: Nifi error after Solrj Upgrade
> >
> > PHISH ALERT! CHECK VALIDITY IF CLICKING, SHARING, RESPONDING
> >
> > Check the class path of your application, whether it already has a
> dependency on Jetty. If so, you need to pick one version so you don’t get
> multiple versions of jetty on the class path.
> >
> > If you use maven you can run “mvn dependency:tree” or similar to see
> them all.
> >
> > Jan Høydahl
> >
> >> 8. jan. 2024 kl. 01:14 skrev Subhasis Patra <subhasis.pa...@e2open.com
> .invalid<mailto:subhasis.pa...@e2open.com.invalid<mailto:
> subhasis.pa...@e2open.com.invalid
> %3cmailto:subhasis.pa...@e2open.com.invalid>>>:
> >>
> >> Hi Everyone,
> >>
> >> Appreciate any help on following.
> >>
> >> I am using nifi-1.23.2 and Solr version is 9.2.0.
> >> In my nifi processor I have logic to create Solr client. It was working
> as expected till Solrj8.11.2. Last week I upgraded my Solrj to 9.4.0. After
> that I started getting following error while creating Solr client in my
> nifi processor.
> >>
> >> java.lang.IncompatibleClassChangeError: class
> org.eclipse.jetty.http.HttpFields$Mutable can not implement
> org.eclipse.jetty.http.HttpFields, because it is not an interface
> (org.eclipse.jetty.http.HttpFields is in unnamed module of loader
> org.apache.nifi.nar.NarClassLoader @4a8df3e2)
> >> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> >> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
> >> at
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
> >> at java.base/java.net
> .URLClassLoader.defineClass(URLClassLoader.java:524)
> >> at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
> >> at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
> >> at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
> >> at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
> >> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
> >> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
> >> at org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.<init>(
> http://Http2SolrClient.java:1066<http://Http2SolrClient.java:1066><
> http://Http2SolrClient.java:1066<http://Http2SolrClient.java:1066>>)
> >> at org.apache.solr.client.solrj.impl.CloudHttp2SolrClient.<init>(
> http://CloudHttp2SolrClient.java:61<http://CloudHttp2SolrClient.java:61><
> http://CloudHttp2SolrClient.java:61<http://CloudHttp2SolrClient.java:61>>)
> >> at
> org.apache.solr.client.solrj.impl.CloudHttp2SolrClient$Builder.build(CloudHttp2SolrClient.java:429)
> >>
> >> I am using following method to create solr Client.
> >>
> >> CloudSolrClient.Builder(urlList,
> Optional.empty()).withZkConnectTimeout(10000, TimeUnit.MILLISECONDS)
> >> .withZkClientTimeout(60000, TimeUnit.MILLISECONDS).build()
> >>
> >> Thanks
> >> Subhasis Patra
> >> 240-755-2601
> >> subhasis.pa...@e2open.com<mailto:subhasis.pa...@e2open.com<mailto:
> subhasis.pa...@e2open.com%3cmailto:subhasis.pa...@e2open.com<mailto:
> subhasis.pa...@e2open.com%3cmailto:subhasis.pa...@e2open.com%
> 3cmailto:subhasis.pa...@e2open.com%3cmailto:subhasis.pa...@e2open.com>>>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org<mailto:
> dev-unsubscr...@solr.apache.org<mailto:dev-unsubscr...@solr.apache.org%
> 3cmailto:dev-unsubscr...@solr.apache.org>>
> > For additional commands, e-mail: dev-h...@solr.apache.org<mailto:
> dev-h...@solr.apache.org<mailto:dev-h...@solr.apache.org%
> 3cmailto:dev-h...@solr.apache.org>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org<mailto:
> dev-unsubscr...@solr.apache.org>
> For additional commands, e-mail: dev-h...@solr.apache.org<mailto:
> dev-h...@solr.apache.org>
>


-- 
Sincerely yours
Mikhail Khludnev

Reply via email to