Please try a more recent version of Solr. 9.3.0 has fixed many classloading
issues since 9.0.0.

- Houston

On Thu, Aug 10, 2023 at 2:45 PM Kojo <rbsnk...@gmail.com> wrote:

> When I add <requestHandler name="/sql"
> class="org.apache.solr.handler.sql.SQLHandler"> to solrconfig.xml, I
> cannot even create a new collection:
>
>
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:7574/solr
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:7574/solr
> 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> org.apache.solr.common.SolrException: Error CREATEing SolrCore
> 'teste_shard1_replica_n7': Unable to create core
> [teste_shard1_replica_n7] Caused by:
> org.apache.solr.common.SolrException
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:8983/solr
> 10/08/2023, 15:43:38 ERROR false RequestHandlerBase
> org.apache.solr.common.SolrException: Error CREATEing SolrCore
> 'teste_shard2_replica_n2': Unable to create core
> [teste_shard2_replica_n2] Caused by:
> org.apache.solr.common.SolrException
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Error from
> shard: http://192.168.0.65:8983/solr
> 10/08/2023, 15:43:38 ERROR false CollectionHandlingUtils Cleaning up
> collection [teste].
> 10/08/2023, 15:43:38 ERROR false OverseerCollectionMessageHandler
> Collection: teste operation: create failed
>
>
> Em qui., 10 de ago. de 2023 às 15:41, Kojo <rbsnk...@gmail.com> escreveu:
> >
> > I used the command:
> > /opt/solr-9.0.0/bin/solr -m 20g -e cloud  -Dsolr.modules=sql -z
> 192.168.0.65:2181
> >
> > A query on the dashboard does not work.
> >
> > This is the beggining of the stacktrace:
> >
> >
> > 2023-08-10 18:38:11.682 ERROR (qtp2106165633-31) [c:bv_collection
> s:shard2 r:core_node7 x:bv_collection_shard2_replica_n4]
> o.a.s.s.HttpSolrCall java.lang.RuntimeException:
> java.lang.NoClassDefFoundError: org/apache/solr/common/SolrException =>
> java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> org/apache/solr/common/SolrException
> > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> > java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> org/apache/solr/common/SolrException
> > at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:840)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:641)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:239)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:207)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:202)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> ~[solr-core-9.0.0.jar:9.0.0 a4eb7aa123dc53f8dac74d80b66a490f2d6b4a26 -
> janhoy - 2022-05-05 01:00:08]
> > at
> org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
> ~[jetty-security-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> ~[jetty-servlet-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> ~[jetty-rewrite-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> > at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> ~[jetty-server-9.4.44.v20210927.jar:9.4.44.v20210927]
> >
> > Em qui., 10 de ago. de 2023 às 10:14, Kojo <rbsnk...@gmail.com>
> escreveu:
> >>
> >> I included modules in solrconfig.xml, i thought it was enought.
> >>
> >> I will try later and post the result here.
> >> bin/solr start -e techproducts -Dsolr.modules=sql
> >>
> >>
> >> Thanks!
> >>
> >>
> >>
> >> Em qui., 10 de ago. de 2023 às 09:40, Eric Pugh <
> ep...@opensourceconnections.com> escreveu:
> >>>
> >>> You need to enable the sql module.  I suspect you won’t be the first
> person with this email now that we have added modules.  It would be nice if
> the UI told you that you need to restart Solr with that setting!
> >>>
> >>> SQL Query Language :: Apache Solr Reference Guide
> >>> solr.apache.org
> >>>
> >>>
> >>> bin/solr start -e techproducts -Dsolr.modules=sql
> >>>
> >>>
> >>>
> >>>
> >>> On Aug 10, 2023, at 8:36 AM, Kojo <rbsnk...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>> I'm trying to get the SQL query requestHandler up and running using
> this
> >>> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> >>>
> >>> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> >>>
> >>> I went through the Solr documentation, but I'm hitting a roadblock with
> >>> just that. Do you know any other sources that might help? I've already
> >>> checked out the official Solr documentation here:
> >>>
> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> >>>
> >>> Here's what I've tried so far, but sadly, no luck:
> >>>
> >>> - Tried a query on the admin page.
> >>> - Attempted to connect via sqlalchemy-solr.
> >>> - Gave a shot at sending a request to the _sql/ endpoint.
> >>>
> >>> On the config side of things:
> >>>
> >>> - Initially, I thought I could get away with no extra config, as per
> Solr's
> >>> docs. Supposedly, the /sql request handler should already be good to
> go in
> >>> a regular Solr installation.
> >>>
> >>> - Then I got a bit fancy and added the request handler config directly
> into
> >>> the solrconfig.xml file like this:
> >>>
> >>> <requestHandler name="/sql" class="solr.SQLHandler">
> >>>    <lst name="defaults">
> >>>        <str name="config">solrconfig.xml</str>
> >>>    </lst>
> >>> </requestHandler>
> >>>
> >>>
> >>> To solve this puzzle, I tried these moves:
> >>>
> >>> Grabbed the solr-core-9.0.0.jar library from
> >>> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> >>> <solr_home>/server/lib/.
> >>> I doubled down and copied the solr-sql-9.0.0.jar from
> >>> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> >>> <solr_home>/server/lib/ext/.
> >>> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> >>> point to the outside library directory:
> >>>
> >>> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> >>>
> >>>
> >>> I'm reaching out to see if I'm on the right track here. If I am, I'm
> >>> planning to keep poking around and maybe get some error logs to show
> you
> >>> later. But if I'm off the mark, your tips or suggestions for other
> places
> >>> to look would be awesome.
> >>>
> >>> Thanks a bunch for your help!
> >>>
> >>> Cheers,
> >>> Koji
> >>>
> >>>
> >>> _______________________
> >>> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467
> | http://www.opensourceconnections.com | My Free/Busy
> >>> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed
> >>> This e-mail and all contents, including attachments, is considered to
> be Company Confidential unless explicitly stated otherwise, regardless of
> whether attachments are marked as such.
> >>>
>

Reply via email to