lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Gove <dpg...@gmail.com>
Subject Re: Streaming Expressions (/stream) StreamHandler java.lang.NullPointerException
Date Tue, 28 Jun 2016 11:42:18 GMT
I've not been able to replicate the null pointer exception being seen.

I created a new collection called EventsAndDCF with 4 shards and 3 replicas
using a simple conf
$> /tmp/solr-go/bin/solr/bin/solr create -p 30001 -c EventsAndDCF -d
../../../test/main/conf/sample -n EventsAndDCF -shards 4 -replicationFactor
3

and then sent the same curl command Peter is sending
$> curl --data-urlencode
'expr=search(EventsAndDCF,q="*:*",fl="AccessPath",sort="AccessPath
asc",qt="/export")' "http://localhost:30001/solr/EventsAndDCF/stream"

Because I haven't indexed any data into the collection I get back an
expected error that the sort field cannot be found, but this is *after* the
parsing of the param expr occurs so I know I cannot replicate the exception
you appear to be seeing.

I 2nd Joel's question about being in SolrCloud mode - that is a requirement
of streaming.

- Dennis

On Sun, Jun 26, 2016 at 8:51 PM, Joel Bernstein <joelsolr@gmail.com> wrote:

> The NPE is showing that the expression clause is Null. Are you in SolrCloud
> mode? This is required for Streaming Expressions.
>
> I would try sending the query via your browser also, just to make sure
> there isn't something we're missing in the curl syntax.
>
> You can call the /stream handler directly and pass the expr parameter. Most
> browsers will url encode the expression, but to be sure you can url encode
> the expression before sending it down.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Sat, Jun 25, 2016 at 5:36 PM, Peter Sh <peshashulc@gmail.com> wrote:
>
> > I've got an exception below running
> > curl --data-urlencode
> > 'expr=search(EventsAndDCF,q="*:*",fl="AccessPath",sort="AccessPath
> > asc",qt="/export")' "http://localhost:8983/solr/EventsAndDCF/stream"
> > Solr responce:
> > {"result-set":{"docs":[
> > {"EXCEPTION":null,"EOF":true}]}}
> >
> >
> > My collection EventsAndDCF exists. and I succeed to run GET queries like:
> >
> >
> http://localhost:8983/solr/EventsAndDCF/export?fl=AccessPath&q=*:*&sort=AccessPath
> > desc&wt=json
> >
> > Solr version: 6.0.1. Single node
> >
> >
> >
> > 2016-06-25 21:15:44.147 ERROR (qtp1514322932-16) [   x:EventsAndDCF]
> > o.a.s.h.StreamHandler java.lang.NullPointerException
> > at
> >
> >
> org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.generateStreamExpression(StreamExpressionParser.java:46)
> > at
> >
> >
> org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.parse(StreamExpressionParser.java:37)
> > at
> >
> >
> org.apache.solr.client.solrj.io.stream.expr.StreamFactory.constructStream(StreamFactory.java:178)
> > at
> >
> >
> org.apache.solr.handler.StreamHandler.handleRequestBody(StreamHandler.java:164)
> > at
> >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2053)
> > at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)
> > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:460)
> > at
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:229)
> > at
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
> > at
> >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> > at org.eclipse.jetty.server.Server.handle(Server.java:518)
> > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
> > at
> >
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
> > at
> >
> >
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> > at
> >
> >
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
> > at
> >
> >
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
> > at
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
> > at java.lang.Thread.run(Unknown Source)
> >
> > 2016-06-25 21:15:44.147 INFO  (qtp1514322932-16) [   x:EventsAndDCF]
> > o.a.s.c.S.Request [EventsAndDCF]  webapp=/solr path=/stream
> >
> >
> params={'expr=search(EventsAndDCF,q%3D*:*,fl%3DAccessPath,sort%3DAccessPath+asc,qt%3D/export)'}
> > status=0 QTime=2
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message