problem using Http2SolrClient with solr 8.3.0

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

problem using Http2SolrClient with solr 8.3.0

Odysci
Hi,
I have a solr cloud setup using solr 8.3 and SolrJj, which works fine using
the HttpSolrClient as well as the CloudSolrClient. I use 2 solr nodes with
3 Zookeeper nodes.
Recently I configured my machines to handle ssl, http/2 and then I tried
using in my java code the Http2SolrClient supported by SolrJ 8.3.0, but I
got the following error at run time upon instantiating the Http2SolrClient
object:

Has anyone seen this problem?
Thanks
Reinaldo
===================

Oops: NoClassDefFoundError
Unexpected error : Unexpected Error, caused by exception
NoClassDefFoundError: org/eclipse/jetty/client/api/Request

play.exceptions.UnexpectedException: Unexpected Error
at play.jobs.Job.onException(Job.java:180)
at play.jobs.Job.call(Job.java:250)
at Invocation.Job(Play!)
Caused by: java.lang.NoClassDefFoundError:
org/eclipse/jetty/client/api/Request
at
org.apache.solr.client.solrj.impl.Http2SolrClient$AsyncTracker.<init>(Http2SolrClient.java:789)
at
org.apache.solr.client.solrj.impl.Http2SolrClient.<init>(Http2SolrClient.java:131)
at
org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.build(Http2SolrClient.java:833)
... more
Caused by: java.lang.ClassNotFoundException:
org.eclipse.jetty.client.api.Request
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 16 more
==============
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Houston Putman
Are you overriding the Jetty version in your application using SolrJ?

On Wed, Nov 27, 2019 at 4:00 PM Odysci <[hidden email]> wrote:

> Hi,
> I have a solr cloud setup using solr 8.3 and SolrJj, which works fine using
> the HttpSolrClient as well as the CloudSolrClient. I use 2 solr nodes with
> 3 Zookeeper nodes.
> Recently I configured my machines to handle ssl, http/2 and then I tried
> using in my java code the Http2SolrClient supported by SolrJ 8.3.0, but I
> got the following error at run time upon instantiating the Http2SolrClient
> object:
>
> Has anyone seen this problem?
> Thanks
> Reinaldo
> ===================
>
> Oops: NoClassDefFoundError
> Unexpected error : Unexpected Error, caused by exception
> NoClassDefFoundError: org/eclipse/jetty/client/api/Request
>
> play.exceptions.UnexpectedException: Unexpected Error
> at play.jobs.Job.onException(Job.java:180)
> at play.jobs.Job.call(Job.java:250)
> at Invocation.Job(Play!)
> Caused by: java.lang.NoClassDefFoundError:
> org/eclipse/jetty/client/api/Request
> at
>
> org.apache.solr.client.solrj.impl.Http2SolrClient$AsyncTracker.<init>(Http2SolrClient.java:789)
> at
>
> org.apache.solr.client.solrj.impl.Http2SolrClient.<init>(Http2SolrClient.java:131)
> at
>
> org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.build(Http2SolrClient.java:833)
> ... more
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jetty.client.api.Request
> at
>
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at
>
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ... 16 more
> ==============
>
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Jörn Franke
In reply to this post by Odysci
Which jdk version? In this Setting i would recommend JDK11.

> Am 27.11.2019 um 22:00 schrieb Odysci <[hidden email]>:
>
> Hi,
> I have a solr cloud setup using solr 8.3 and SolrJj, which works fine using
> the HttpSolrClient as well as the CloudSolrClient. I use 2 solr nodes with
> 3 Zookeeper nodes.
> Recently I configured my machines to handle ssl, http/2 and then I tried
> using in my java code the Http2SolrClient supported by SolrJ 8.3.0, but I
> got the following error at run time upon instantiating the Http2SolrClient
> object:
>
> Has anyone seen this problem?
> Thanks
> Reinaldo
> ===================
>
> Oops: NoClassDefFoundError
> Unexpected error : Unexpected Error, caused by exception
> NoClassDefFoundError: org/eclipse/jetty/client/api/Request
>
> play.exceptions.UnexpectedException: Unexpected Error
> at play.jobs.Job.onException(Job.java:180)
> at play.jobs.Job.call(Job.java:250)
> at Invocation.Job(Play!)
> Caused by: java.lang.NoClassDefFoundError:
> org/eclipse/jetty/client/api/Request
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient$AsyncTracker.<init>(Http2SolrClient.java:789)
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient.<init>(Http2SolrClient.java:131)
> at
> org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.build(Http2SolrClient.java:833)
> ... more
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jetty.client.api.Request
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ... 16 more
> ==============
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Odysci
I'm using OpenJDK 11

On Wed, Nov 27, 2019 at 7:12 PM Jörn Franke <[hidden email]> wrote:

> Which jdk version? In this Setting i would recommend JDK11.
>
> > Am 27.11.2019 um 22:00 schrieb Odysci <[hidden email]>:
> >
> > Hi,
> > I have a solr cloud setup using solr 8.3 and SolrJj, which works fine
> using
> > the HttpSolrClient as well as the CloudSolrClient. I use 2 solr nodes
> with
> > 3 Zookeeper nodes.
> > Recently I configured my machines to handle ssl, http/2 and then I tried
> > using in my java code the Http2SolrClient supported by SolrJ 8.3.0, but I
> > got the following error at run time upon instantiating the
> Http2SolrClient
> > object:
> >
> > Has anyone seen this problem?
> > Thanks
> > Reinaldo
> > ===================
> >
> > Oops: NoClassDefFoundError
> > Unexpected error : Unexpected Error, caused by exception
> > NoClassDefFoundError: org/eclipse/jetty/client/api/Request
> >
> > play.exceptions.UnexpectedException: Unexpected Error
> > at play.jobs.Job.onException(Job.java:180)
> > at play.jobs.Job.call(Job.java:250)
> > at Invocation.Job(Play!)
> > Caused by: java.lang.NoClassDefFoundError:
> > org/eclipse/jetty/client/api/Request
> > at
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient$AsyncTracker.<init>(Http2SolrClient.java:789)
> > at
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient.<init>(Http2SolrClient.java:131)
> > at
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.build(Http2SolrClient.java:833)
> > ... more
> > Caused by: java.lang.ClassNotFoundException:
> > org.eclipse.jetty.client.api.Request
> > at
> >
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> > at
> >
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> > ... 16 more
> > ==============
>
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Odysci
In reply to this post by Houston Putman
No, I did nothing specific to Jetty. Should I?
Thx

On Wed, Nov 27, 2019 at 6:54 PM Houston Putman <[hidden email]>
wrote:

> Are you overriding the Jetty version in your application using SolrJ?
>
> On Wed, Nov 27, 2019 at 4:00 PM Odysci <[hidden email]> wrote:
>
> > Hi,
> > I have a solr cloud setup using solr 8.3 and SolrJj, which works fine
> using
> > the HttpSolrClient as well as the CloudSolrClient. I use 2 solr nodes
> with
> > 3 Zookeeper nodes.
> > Recently I configured my machines to handle ssl, http/2 and then I tried
> > using in my java code the Http2SolrClient supported by SolrJ 8.3.0, but I
> > got the following error at run time upon instantiating the
> Http2SolrClient
> > object:
> >
> > Has anyone seen this problem?
> > Thanks
> > Reinaldo
> > ===================
> >
> > Oops: NoClassDefFoundError
> > Unexpected error : Unexpected Error, caused by exception
> > NoClassDefFoundError: org/eclipse/jetty/client/api/Request
> >
> > play.exceptions.UnexpectedException: Unexpected Error
> > at play.jobs.Job.onException(Job.java:180)
> > at play.jobs.Job.call(Job.java:250)
> > at Invocation.Job(Play!)
> > Caused by: java.lang.NoClassDefFoundError:
> > org/eclipse/jetty/client/api/Request
> > at
> >
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient$AsyncTracker.<init>(Http2SolrClient.java:789)
> > at
> >
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient.<init>(Http2SolrClient.java:131)
> > at
> >
> >
> org.apache.solr.client.solrj.impl.Http2SolrClient$Builder.build(Http2SolrClient.java:833)
> > ... more
> > Caused by: java.lang.ClassNotFoundException:
> > org.eclipse.jetty.client.api.Request
> > at
> >
> >
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> > at
> >
> >
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> > ... 16 more
> > ==============
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Shawn Heisey-2
On 11/28/2019 9:30 AM, Odysci wrote:
> No, I did nothing specific to Jetty. Should I?

The http/2 Solr client uses a different http client than the previous
ones do.  It uses the client from Jetty, while the previous clients use
the one from Apache.

Achieving http/2 with the Apache client would have required using a beta
release, while the Jetty client has had http/2 in a GA release for three
years.

The error message you're getting indicates that you have not included
the Jetty client jar in your project.  Using a dependency manager should
pull in all required dependencies.  If you're not using a dependency
manager, you will find all the jars that you need in the dist/solrj-lib
directory in the Solr download.

Thanks,
Shawn
Reply | Threaded
Open this post in threaded view
|

Re: problem using Http2SolrClient with solr 8.3.0

Odysci
That worked. I included the dist/solrj-lib  libs in my class path, and
could make it work with Http2SolrClient. Thanks!

Still on a related topic, is the CloudHttp2SolrClient client fully stable?
(I'm using solr 7.7 and solr 8.3)
Thanks

On Thu, Nov 28, 2019 at 3:00 PM Shawn Heisey <[hidden email]> wrote:

> On 11/28/2019 9:30 AM, Odysci wrote:
> > No, I did nothing specific to Jetty. Should I?
>
> The http/2 Solr client uses a different http client than the previous
> ones do.  It uses the client from Jetty, while the previous clients use
> the one from Apache.
>
> Achieving http/2 with the Apache client would have required using a beta
> release, while the Jetty client has had http/2 in a GA release for three
> years.
>
> The error message you're getting indicates that you have not included
> the Jetty client jar in your project.  Using a dependency manager should
> pull in all required dependencies.  If you're not using a dependency
> manager, you will find all the jars that you need in the dist/solrj-lib
> directory in the Solr download.
>
> Thanks,
> Shawn
>