Re: NullPointerException on openStreams

2017-07-14 Thread Erick Erickson
Joel: Would it make sense to throw a more informative error when the stream context wasn't set? Maybe an explicit check in open() or some such? Erick On Fri, Jul 14, 2017 at 8:25 AM, Joe Obernberger wrote: > Still stuck on this one. I suspect there is something

Re: NullPointerException on openStreams

2017-07-14 Thread Joe Obernberger
Still stuck on this one. I suspect there is something I'm not setting in the StreamContext. I'm not sure what to put for these two? context.put("core", this.coreName); context.put("solr-core", req.getCore()); Also not sure what the class is for ClassifyStream? Error that I'm getting is:

Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
If you can include the stack trace and version of Solr we can see what's causing the exception. Joel Bernstein http://joelsolr.blogspot.com/ On Thu, Jul 13, 2017 at 4:33 PM, Joe Obernberger < joseph.obernber...@gmail.com> wrote: > Thanks for this. I'm now trying to use stream for classify, but

Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Thanks for this. I'm now trying to use stream for classify, but am getting an ArrayIndexOutOfBounds error on the stream.open(). I'm setting the streamFactory up, and including .withFunctionName("classify", ClassifyStream.class) - but is that class in orga.apache.solr.handler? -

Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Thank you Joel - that was it. context = new StreamContext(); context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache()); context.workerID = 0; context.numWorkers = 1; context.setModelCache(StaticInfo.getSingleton(props).getModelCache()); Then:

Re: NullPointerException on openStreams

2017-07-13 Thread Susheel Kumar
This the working code snippet I have, if that helps public static void main(String []args) throws IOException { String clause; TupleStream stream; List tuples; StreamContext streamContext = new StreamContext(); SolrClientCache solrClientCache = new SolrClientCache();

Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
It's most likely that you're not setting the StreamContext. New versions of Solr expect the StreamContext to be set before the stream is opened. The SolrClientCache also needs to present in the StreamContext. You can take a look at how the StreamHandler does this for an example:

NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Hi All - trying to call ClouderSolrStream.open(), but I'm getting this error: java.io.IOException: java.lang.NullPointerException at org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:408) at