That stack trace points here:
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/7.3.0/solr/core/src/java/org/apache/solr/handler/sql/SolrSchema.java#L103

So the Sql Schema is not initializing properly for this dataset. I'd be
interested in understanding why.

If you want to create a jira ticket and attach your schema we can track
this down. I'll probably attach a special binary to the ticket which has
additional logging so we can can find out what field is causing the problem.

Joel Bernstein
http://joelsolr.blogspot.com/


On Thu, Apr 18, 2019 at 1:38 PM David Barnett <oand...@gmail.com> wrote:

> Hi Joel, besides the solr log is there anywhere else i need to go ?
> anything I need to set to get more detail ?
>
> On Thu, 18 Apr 2019 at 10:46, Joel Bernstein <joels...@gmail.com> wrote:
>
> > This let's make sure the jdbc URL is correct.
> >
> > Reloading the collection shouldn't effect much unless the schema is
> > different.
> >
> > But as Shawn mentioned the stack trace is not coming from Solr. Is there
> > more in the logs beyond the Calcite exception?
> >
> > Joel Bernstein
> > http://joelsolr.blogspot.com/
> >
> >
> > On Thu, Apr 18, 2019 at 11:04 AM Shawn Heisey <apa...@elyograg.org>
> wrote:
> >
> > > On 4/18/2019 1:47 AM, David Barnett wrote:
> > > > I have a large solr 7.3 collection 400m + documents.
> > > >
> > > > I’m trying to use the Solr JDBC driver to query the data but I get a
> > > >
> > > > java.io.IOException: Failed to execute sqlQuery 'select id from
> > document
> > > limit 10' against JDBC connection 'jdbc:calcitesolr:'.
> > > > Error while executing SQL "select id from document limit 10": null
> > >
> > > <snip>
> > >
> > > By the way, either that JDBC url is extremely incomplete or you nuked
> it
> > > from the log before sharing.  Seeing the construction of the full URL
> > > might be helpful.  If you need to redact it in some way for privacy
> > > concerns, do so in a way so that we can still tell what the URL was -
> > > change a real password to PASSWORD, change things like host names to
> > > something like HOST_NAME, etc.
> > >
> > > > Caused by: java.lang.NullPointerException
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.validate(VolcanoPlanner.java:891
> > > >          at
> > >
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:866)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:883)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:101)
> > > >          at
> > >
> >
> org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:336)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1496)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.register(VolcanoPlanner.java:863)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:883)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:101)
> > > >          at
> > >
> >
> org.apache.calcite.rel.AbstractRelNode.onRegister(AbstractRelNode.java:336)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.registerImpl(VolcanoPlanner.java:1496)
> > > >          at
> > >
> >
> org.apache.calcite.plan.volcano.VolcanoPlanner.setRoot(VolcanoPlanner.java:308)
> > > >          at
> org.apache.calcite.tools.Programs$5.run(Programs.java:309)
> > > >          at
> > >
> org.apache.calcite.tools.Programs$SequenceProgram.run(Programs.java:387)
> > > >          at
> > org.apache.calcite.prepare.Prepare.optimize(Prepare.java:186)
> > > >          at
> > > org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:319)
> > > >          at
> > > org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:228)
> > > >          at
> > >
> >
> org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:784)
> > > >          at
> > >
> >
> org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:639)
> > > >          at
> > >
> >
> org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:609)
> > > >          at
> > >
> >
> org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
> > > >          at
> > >
> >
> org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:603)
> > > >          at
> > >
> >
> org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:638)
> > > >          at
> > >
> >
> org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:149)
> > >
> > > The root cause is an NPE in pure calcite code (no Solr classes listed).
> > > Calcite didn't like the SQL query for some reason.  I'm not at all
> > > familiar with Calcite.
> > >
> > > Did you try to query a single core (shard replica) rather than the
> > > collection?  I wonder if doing that might make the driver think it's
> not
> > > talking to SolrCloud.  Joel is the expert here, I don't know much about
> > it.
> > >
> > > What context is this being used in?  The dataimport handler, or
> > > something you wrote yourself?  I don't know if this information is
> > > important, just trying to provide as much information for Joel as I
> can.
> > >
> > > Thanks,
> > > Shawn
> > >
> >
>
>
> --
> *David Barnett*
> O&G Technology Consulting Ltd
> oand...@gmail.com
> +44 (0) 7753 235608
>

Reply via email to