Re: Null pointer exception in QueryComponent.MergeDds method

2020-07-07 Thread Jae Joo
Yes, we have timeAllowed=2 sec.


On Tue, Jul 7, 2020 at 2:20 PM Mikhail Khludnev  wrote:

> Still not clear regarding fl param. Does request enabled timeAllowed param?
> Anyway debugQuery true should give a clue why  "sort_values"  are absent in
> shard response, note they should be supplied at
> QueryComponent.doFieldSortValues(ResponseBuilder, SolrIndexSearcher).
>
> On Tue, Jul 7, 2020 at 4:19 PM Jae Joo  wrote:
>
> > 8.3.1
> >
> >   > required="true" multiValued="false" docValues="true"/>
> >   > required="true" multiValued="false"/>
> >
> > the field "id" is for nested document.
> >
> >
> >
> >
> > On Mon, Jul 6, 2020 at 4:17 PM Mikhail Khludnev  wrote:
> >
> > > Hi,
> > > What's the version? What's uniqueKey? is it stored? what's fl param?
> > >
> > > On Mon, Jul 6, 2020 at 5:12 PM Jae Joo  wrote:
> > >
> > > > I am seeing the nullPointerException in the list below and I am
> > > > looking for how to fix the exception.
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > NamedList sortFieldValues =
> > > > (NamedList)(srsp.getSolrResponse().getResponse().get("sort_values"));
> > > > if (sortFieldValues.size()==0 && // we bypass merging this response
> > > > only if it's partial itself
> > > > thisResponseIsPartial) { // but not the previous
> > > one!!
> > > >   continue; //fsv timeout yields empty sort_vlaues
> > > > }
> > > >
> > > >
> > > >
> > > > 2020-07-06 12:45:47.001 ERROR (qtp745962066-636182) [c:]]
> > > > o.a.s.h.RequestHandlerBase java.lang.NullPointerException
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:914)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:198)
> > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2576)
> > > > at
> > > > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:799)
> > > > at
> > > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:578)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> > > > at
> > > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> > > > at
> > > >
> > >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> > > > at
> > > >
> > > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> > > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > >
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>


Re: Null pointer exception in QueryComponent.MergeDds method

2020-07-07 Thread Mikhail Khludnev
Still not clear regarding fl param. Does request enabled timeAllowed param?
Anyway debugQuery true should give a clue why  "sort_values"  are absent in
shard response, note they should be supplied at
QueryComponent.doFieldSortValues(ResponseBuilder, SolrIndexSearcher).

On Tue, Jul 7, 2020 at 4:19 PM Jae Joo  wrote:

> 8.3.1
>
>   required="true" multiValued="false" docValues="true"/>
>   required="true" multiValued="false"/>
>
> the field "id" is for nested document.
>
>
>
>
> On Mon, Jul 6, 2020 at 4:17 PM Mikhail Khludnev  wrote:
>
> > Hi,
> > What's the version? What's uniqueKey? is it stored? what's fl param?
> >
> > On Mon, Jul 6, 2020 at 5:12 PM Jae Joo  wrote:
> >
> > > I am seeing the nullPointerException in the list below and I am
> > > looking for how to fix the exception.
> > >
> > > Thanks,
> > >
> > >
> > > NamedList sortFieldValues =
> > > (NamedList)(srsp.getSolrResponse().getResponse().get("sort_values"));
> > > if (sortFieldValues.size()==0 && // we bypass merging this response
> > > only if it's partial itself
> > > thisResponseIsPartial) { // but not the previous
> > one!!
> > >   continue; //fsv timeout yields empty sort_vlaues
> > > }
> > >
> > >
> > >
> > > 2020-07-06 12:45:47.001 ERROR (qtp745962066-636182) [c:]]
> > > o.a.s.h.RequestHandlerBase java.lang.NullPointerException
> > > at
> > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:914)
> > > at
> > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613)
> > > at
> > >
> > >
> >
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592)
> > > at
> > >
> > >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431)
> > > at
> > >
> > >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:198)
> > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2576)
> > > at
> > > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:799)
> > > at
> > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:578)
> > > at
> > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> > > at
> > >
> > >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> > > at
> > >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> > > at
> > >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> > > at
> > >
> > >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> > >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> >
>


-- 
Sincerely yours
Mikhail Khludnev


Re: Null pointer exception in QueryComponent.MergeDds method

2020-07-07 Thread Jae Joo
8.3.1

 
 

the field "id" is for nested document.




On Mon, Jul 6, 2020 at 4:17 PM Mikhail Khludnev  wrote:

> Hi,
> What's the version? What's uniqueKey? is it stored? what's fl param?
>
> On Mon, Jul 6, 2020 at 5:12 PM Jae Joo  wrote:
>
> > I am seeing the nullPointerException in the list below and I am
> > looking for how to fix the exception.
> >
> > Thanks,
> >
> >
> > NamedList sortFieldValues =
> > (NamedList)(srsp.getSolrResponse().getResponse().get("sort_values"));
> > if (sortFieldValues.size()==0 && // we bypass merging this response
> > only if it's partial itself
> > thisResponseIsPartial) { // but not the previous
> one!!
> >   continue; //fsv timeout yields empty sort_vlaues
> > }
> >
> >
> >
> > 2020-07-06 12:45:47.001 ERROR (qtp745962066-636182) [c:]]
> > o.a.s.h.RequestHandlerBase java.lang.NullPointerException
> > at
> >
> >
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:914)
> > at
> >
> >
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613)
> > at
> >
> >
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592)
> > at
> >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431)
> > at
> >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:198)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2576)
> > at
> > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:799)
> > at
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:578)
> > at
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> > at
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> > at
> >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> > at
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> > at
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> > at
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>


Re: Null pointer exception in QueryComponent.MergeDds method

2020-07-06 Thread Mikhail Khludnev
Hi,
What's the version? What's uniqueKey? is it stored? what's fl param?

On Mon, Jul 6, 2020 at 5:12 PM Jae Joo  wrote:

> I am seeing the nullPointerException in the list below and I am
> looking for how to fix the exception.
>
> Thanks,
>
>
> NamedList sortFieldValues =
> (NamedList)(srsp.getSolrResponse().getResponse().get("sort_values"));
> if (sortFieldValues.size()==0 && // we bypass merging this response
> only if it's partial itself
> thisResponseIsPartial) { // but not the previous one!!
>   continue; //fsv timeout yields empty sort_vlaues
> }
>
>
>
> 2020-07-06 12:45:47.001 ERROR (qtp745962066-636182) [c:]]
> o.a.s.h.RequestHandlerBase java.lang.NullPointerException
> at
>
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:914)
> at
>
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613)
> at
>
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592)
> at
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431)
> at
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:198)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2576)
> at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:799)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:578)
> at
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> at
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> at
>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> at
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> at
>
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>


-- 
Sincerely yours
Mikhail Khludnev


Re: Null Pointer Exception without details on Update in schemaless 7.4

2018-09-06 Thread Steve Rowe
Hi,

Null handling in AddSchemaFieldsUpdateProcessorFactory has been added for Solr 
7.5, see https://issues.apache.org/jira/browse/SOLR-12704 .

--
Steve
www.lucidworks.com

> On Sep 6, 2018, at 1:11 AM, deniz  wrote:
> 
> server is also 7.4 
> 
> and your assumption/check on null values on input doc seems legit... I have
> added some checks before pushing the doc to solr and replaced null values
> with some default values, and updates seem going through w/o problem...
> though having a little bit explanatory logs on server side might be
> useful...
> 
> thanks a lot for pointing out the null fields 
> 
> 
> 
> -
> Zeki ama calismiyor... Calissa yapar...
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html



Re: Null Pointer Exception without details on Update in schemaless 7.4

2018-09-05 Thread deniz
server is also 7.4 

and your assumption/check on null values on input doc seems legit... I have
added some checks before pushing the doc to solr and replaced null values
with some default values, and updates seem going through w/o problem...
though having a little bit explanatory logs on server side might be
useful...

thanks a lot for pointing out the null fields 



-
Zeki ama calismiyor... Calissa yapar...
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Null Pointer Exception without details on Update in schemaless 7.4

2018-09-05 Thread Shawn Heisey

On 9/5/2018 8:32 PM, deniz wrote:

I have set up a schemaless solr (cloud) and have been trying to test the
updates. as DIH is not going through field guessing, I have wrote a small
piece of code to query data from db and push the docs to solr...

Once the client pushes the docs to solr, on server there are npe logs as
below:
  
o.a.s.h.RequestHandlerBase java.lang.NullPointerException

   at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.mapValueClassesToFieldType(AddSchemaFieldsUpdateProcessorFactory.java:509)


Your client-side log indicated the SolrJ version, but you did not say 
which version of Solr you're running on the server.


If the server version is also 7.4.0, then my examination of the source 
code will be accurate.  It seems that when the 
AddSchemaFieldsUpdateProcessorFactory class is looping through the 
fields that it found in the input document, one of them is the java 
'null' value instead of an instance of the SolrInputField class. Thus 
when the code tries to call the "getValues()" method (line 509) on the 
field object, Java throws NullPointerException.


I do not know what could result in a null value like that, or whether 
SolrInputDocument needs some kind of safety check to make sure a null 
SolrInputField is not possible.


If the server version isn't 7.4.0, then I cannot be 100 percent certain 
about what's happening, because the code could be different in that version.


Thanks,
Shawn



Re: Null Pointer Exception without details on Update in schemaless 7.4

2018-09-05 Thread deniz
nope, the data i am pushing is stuff like string, int, etc etc

i have have checked further and made bunch of trial and error, here are the
things I was able to figure out:

 - If a date value from database is null, then it is breaking the update
with "-00-00" is not a valid date string error. 
 - There are some column names with suffixes which is triggering dynamic
field creation with incorrect data.

But above cases have proper error logs unlike the one I have initially
posted. 




-
Zeki ama calismiyor... Calissa yapar...
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: Null Pointer Exception without details on Update in schemaless 7.4

2018-09-05 Thread David Hastings
Are you trying to push a java hash to solr?

On Sep 5, 2018, at 10:32 PM, deniz 
mailto:denizdurmu...@gmail.com>> wrote:

I have set up a schemaless solr (cloud) and have been trying to test the
updates. as DIH is not going through field guessing, I have wrote a small
piece of code to query data from db and push the docs to solr...

Once the client pushes the docs to solr, on server there are npe logs as
below:


o.a.s.h.RequestHandlerBase java.lang.NullPointerException
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.mapValueClassesToFieldType(AddSchemaFieldsUpdateProcessorFactory.java:509)
 at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$AddSchemaFieldsUpdateProcessor.processAdd(AddSchemaFieldsUpdateProcessorFactory.java:396)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldNameMutatingUpdateProcessorFactory$1.processAdd(FieldNameMutatingUpdateProcessorFactory.java:75)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:118)
 at
org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:55)
 at
org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:92)
 at
org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:98)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:188)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:144)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:311)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:130)
 at
org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:276)
 at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256)
 at
org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:178)
 at
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:195)
 at
org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:109)
 at
org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:55)
 at
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:97)
 at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
 at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:2539)
 at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
 at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
 at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
 at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
 at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
 at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
 at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
 at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
 at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
 at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
 at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
 at

Re: Null Pointer Exception on distributed search

2016-02-24 Thread Shawn Heisey
On 2/24/2016 9:58 AM, Lokesh Chhaparwal wrote:
> Can someone please update on this exception trace while we are using
> distributed search using shards parameter (solr-master-slave).

The line of code where the NPE happened (from the 4.7.2 source) is in
XMLWriter.java, at line 190:

for (String fname : doc.getFieldNames()) {

This means that "doc" is null.  This variable is pulled out of a
SolrDocumentList object, which means that whatever created that
SolrDocumentList managed to add a null entry.

I ran into a nearly identical stacktrace last year:

https://mail-archives.apache.org/mod_mbox/lucene-solr-user/201509.mbox/%3c55f9e5df.1050...@elyograg.org%3E

I never did get a response to that message on the mailing list, and I
can no longer recall exactly what I did to fix it.  What little I do
remember suggests that this was caused by a situation where the field I
was grouping on was not present in at least one document.  This
situation should have been impossible in our data set, but occasionally
a badly formatted document will result in bad data in the database used
to populate Solr, which causes unexpected behavior.

Is this perhaps a query that uses grouping?  A similar problem might
happen with facets, but I am unsure about that.

Thanks,
Shawn



Re: Null Pointer Exception on distributed search

2016-02-24 Thread Lokesh Chhaparwal
Hi,

Can someone please update on this exception trace while we are using
distributed search using shards parameter (solr-master-slave).

Thanks,
Lokesh


On Wed, Feb 17, 2016 at 5:33 PM, Lokesh Chhaparwal 
wrote:

> Hi,
>
> We are facing NPE while using distributed search (Solr version 4.7.2)
> (using *shards* parameter in solr query)
>
> Exception Trace:
> ERROR - 2016-02-17 16:44:26.616; org.apache.solr.common.SolrException;
> null:java.lang.NullPointerException
> at org.apache.solr.response.XMLWriter.writeSolrDocument(XMLWriter.java:190)
> at
> org.apache.solr.response.TextResponseWriter.writeSolrDocumentList(TextResponseWriter.java:222)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:184)
> at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:227)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:188)
> at org.apache.solr.response.XMLWriter.writeArray(XMLWriter.java:273)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:190)
> at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:227)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:188)
> at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:227)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:188)
> at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:111)
> at
> org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.java:40)
> at
> org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:756)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:428)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:205)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:745)
>
>
> Can somebody help us in finding the root cause of this exception?
>
> FYI, we have documents split across 8 shards (num docs ~ 20 million) with
> index size ~ 4 GB per node. We are using c3.2xlarge amazon ec2 machines
> with solr running in apache tomcat (memory config 8 to 10 gb). Request
> count ~ 200/sec.
>
> Thanks,
> Lokesh
>
>


Re: Null pointer exception in spell checker at addchecker method

2015-12-24 Thread JoeWang
Thank you! It really help me out. 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4247203.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2014-08-22 Thread nish
Great!! Worked for me too. Thanks a lot



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4154403.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2013-12-09 Thread sweety
yes, it worked.
And i got the reason for the error.
Thanks a lot.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489p4105636.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception in spell checker at addchecker method

2013-12-08 Thread Areek Zillur
From the solrConfig provided it seems like you have only two named
spellcheckers defined (direct  wordbreak), but in your '/spell'
requestHandler you are setting three spellcheckers (direct, default 
wordbreak). As you do not have an unnamed spellchecker, there is no
spellchecker defined with the name 'default'.
Hence its erroring out when its trying to get config for the non-existent
'default' spellchecker. I think it should work if you remove str
name=spellcheck.dictionarydefault/str from your '/spell'
requestHandler?

Hope that helps,

Areek


On Fri, Dec 6, 2013 at 11:33 PM, sweety sweetyshind...@yahoo.com wrote:

 Im trying to use spell check component.
 My *schema* is:(i have included only fields necessary for spell check not
 the entire schema)
 fields

 field name=doc_id type=uuid indexed=true stored=true default=NEW
 multiValued=false/
 field name=id type=string indexed=true stored=true required=true
 multiValued=false/
 field name=contents type=text indexed=true stored=true
 multiValued=false/
 field name=author type=string indexed=true stored=true
 multiValued=true/
 field name=title type=text indexed=true stored=true/
 field name=_version_ type=long indexed=true stored=true
 multiValued=false/
 copyfield source=id dest=text /
 dynamicField name=ignored_* type=text indexed=false stored=false
 multiValued=true/

 field name=spelltext type=spell indexed=true stored=false
 multiValued=true /
 copyField source=contents dest=spelltext /
 /fields
 types
 fieldType name=spell class=solr.TextField 
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 splitOnCaseChange=1/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 /analyzer
 /fieldType
 /types

 My *solrconfig* is:

 searchComponent name=spellcheck class=solr.SpellCheckComponent
 str name=queryAnalyzerFieldTypetext/str
 lst name=spellchecker
 str name=namedirect/str
 str name=fieldcontents/str
 str name=classnamesolr.DirectSolrSpellChecker/str
 str name=distanceMeasureinternal/str
 float name=accuracy0.8/float
 int name=maxEdits1/int
 int name=minPrefix1/int
 int name=maxInspections5/int
 int name=minQueryLength3/int
 float name=maxQueryFrequency0.01/float
 /lst
 /searchComponent

 searchComponent name=spellcheck class=solr.SpellCheckComponent
   lst name=spellchecker
str name=namewordbreak/str
str name=classnamesolr.WordBreakSolrSpellChecker/str
str name=fieldcontents/str
str name=combineWordstrue/str
str name=breakWordstrue/str
int name=maxChanges10/int
  /lst
 /searchComponent

 requestHandler name=/spell class=solr.SearchHandler startup=lazy
 lst name=defaults
 str name=spellchecktrue/str
 str name=spellcheck.dictionarydirect/str
 str name=spellcheck.dictionarydefault/str
 str name=spellcheck.dictionarywordbreak/str
 str name=spellcheckon/str
 str name=spellcheck.extendedResultstrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
 str name=spellcheck.collateExtendedResultstrue/str
 /lst
 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler

 I get this *error*:
 java.lang.NullPointerException at

 org.apache.solr.spelling.*ConjunctionSolrSpellChecker.addChecker*(ConjunctionSolrSpellChecker.java:58)
 at

 org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:475)
 at

 org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:106)
 at

 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:187)
 at

 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 at

 org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:242)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797) at

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
 at

 I know that the error might be in addchecker method,i read this method but
 the coding of this method is such that, for all the null values, default
 values are added.
 (eg: if (queryAnalyzer == null)
  queryAnalyzer = checker.getQueryAnalyzer(); )
 Now so i feel that the Null checker value is sent when
 /checkers.add(checker);/  is executed.

 If i am right tell me how to resolve this,else what has gone wrong.
 Thanks in advance.



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Null-pointer-exception-in-spell-checker-at-addchecker-method-tp4105489.html
 Sent from the Solr - User mailing 

Re: Null pointer exception in spell checker at addchecker method

2013-12-08 Thread ??????
how can i unsubscribe




-- Original --
From:  Areek Zillur;areek...@gmail.com;
Date:  Mon, Dec 9, 2013 02:26 PM
To:  solr-usersolr-user@lucene.apache.org; 

Subject:  Re: Null pointer exception in spell checker at addchecker method



From the solrConfig provided it seems like you have only two named
spellcheckers defined (direct  wordbreak), but in your '/spell'
requestHandler you are setting three spellcheckers (direct, default 
wordbreak). As you do not have an unnamed spellchecker, there is no
spellchecker defined with the name 'default'.
Hence its erroring out when its trying to get config for the non-existent
'default' spellchecker. I think it should work if you remove str
name=spellcheck.dictionarydefault/str from your '/spell'
requestHandler?

Hope that helps,

Areek


On Fri, Dec 6, 2013 at 11:33 PM, sweety sweetyshind...@yahoo.com wrote:

 Im trying to use spell check component.
 My *schema* is:(i have included only fields necessary for spell check not
 the entire schema)
 fields

 field name=doc_id type=uuid indexed=true stored=true default=NEW
 multiValued=false/
 field name=id type=string indexed=true stored=true required=true
 multiValued=false/
 field name=contents type=text indexed=true stored=true
 multiValued=false/
 field name=author type=string indexed=true stored=true
 multiValued=true/
 field name=title type=text indexed=true stored=true/
 field name=_version_ type=long indexed=true stored=true
 multiValued=false/
 copyfield source=id dest=text /
 dynamicField name=ignored_* type=text indexed=false stored=false
 multiValued=true/

 field name=spelltext type=spell indexed=true stored=false
 multiValued=true /
 copyField source=contents dest=spelltext /
 /fields
 types
 fieldType name=spell class=solr.TextField 
 analyzer type=index
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.LowerCaseFilterFactory /
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 filter class=solr.WordDelimiterFilterFactory generateWordParts=1
 splitOnCaseChange=1/
 /analyzer
 analyzer type=query
 tokenizer class=solr.WhitespaceTokenizerFactory/
 filter class=solr.EnglishMinimalStemFilterFactory /
 filter class=solr.SnowballPorterFilterFactory /
 /analyzer
 /fieldType
 /types

 My *solrconfig* is:

 searchComponent name=spellcheck class=solr.SpellCheckComponent
 str name=queryAnalyzerFieldTypetext/str
 lst name=spellchecker
 str name=namedirect/str
 str name=fieldcontents/str
 str name=classnamesolr.DirectSolrSpellChecker/str
 str name=distanceMeasureinternal/str
 float name=accuracy0.8/float
 int name=maxEdits1/int
 int name=minPrefix1/int
 int name=maxInspections5/int
 int name=minQueryLength3/int
 float name=maxQueryFrequency0.01/float
 /lst
 /searchComponent

 searchComponent name=spellcheck class=solr.SpellCheckComponent
   lst name=spellchecker
str name=namewordbreak/str
str name=classnamesolr.WordBreakSolrSpellChecker/str
str name=fieldcontents/str
str name=combineWordstrue/str
str name=breakWordstrue/str
int name=maxChanges10/int
  /lst
 /searchComponent

 requestHandler name=/spell class=solr.SearchHandler startup=lazy
 lst name=defaults
 str name=spellchecktrue/str
 str name=spellcheck.dictionarydirect/str
 str name=spellcheck.dictionarydefault/str
 str name=spellcheck.dictionarywordbreak/str
 str name=spellcheckon/str
 str name=spellcheck.extendedResultstrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
 str name=spellcheck.collateExtendedResultstrue/str
 /lst
 arr name=last-components
 strspellcheck/str
 /arr
 /requestHandler

 I get this *error*:
 java.lang.NullPointerException at

 org.apache.solr.spelling.*ConjunctionSolrSpellChecker.addChecker*(ConjunctionSolrSpellChecker.java:58)
 at

 org.apache.solr.handler.component.SpellCheckComponent.getSpellChecker(SpellCheckComponent.java:475)
 at

 org.apache.solr.handler.component.SpellCheckComponent.prepare(SpellCheckComponent.java:106)
 at

 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:187)
 at

 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
 at

 org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:242)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:1797) at

 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:637)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)
 at

 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
 at

 I know that the error might be in addchecker method,i read this method but
 the coding of this method is such that, for all the null values, default
 values are added.
 (eg: if (queryAnalyzer == null)
  queryAnalyzer = checker.getQueryAnalyzer(); )
 Now so i feel that the Null checker value is sent when
 /checkers.add(checker);/  is executed.

 If i am

Re: NULL POINTER EXCEPTION WITH SOLR SUGGESTER

2013-01-13 Thread Jack Krupansky

What URL did you use? What is your data like?

I tried your exact config but with the field name of name rather than 
spell_check, using the Solr 4.0 example. Then I added the following data:


curl http://localhost:8983/solr/update?commit=true -H 
'Content-type:application/csv' -d '

id,name
sug-1,aardvark abacus ball bill cat cello
sug-2,abate accord band bell cattle check
sug-3,adorn border clean clock'

Then I issued a suggest request using curl and got the expected response:

Jack Krupansky@JackKrupansky ~ $ curl 
http://localhost:8983/solr/suggest?q=bindent=true;

?xml version=1.0 encoding=UTF-8?
response

lst name=responseHeader
 int name=status0/int
 int name=QTime1/int
/lst
lst name=spellcheck
 lst name=suggestions
   lst name=b
 int name=numFound5/int
 int name=startOffset0/int
 int name=endOffset1/int
 arr name=suggestion
   strball/str
   strband/str
   strbell/str
   strbill/str
   strborder/str
 /arr
   /lst
   str name=collationball/str
 /lst
/lst
/response

So, try that simple example first and make sure it works for you, then see 
what else is different in your failing scenario.


-- Jack Krupansky

-Original Message- 
From: obi240

Sent: Saturday, January 12, 2013 12:15 PM
To: solr-user@lucene.apache.org
Subject: NULL POINTER EXCEPTION WITH SOLR SUGGESTER

Hi,

I'm currently working with SOLR 4. I tried calling my suggester feature and
got the error below:

5001java.lang.NullPointerException at
org.apache.lucene.search.suggest.fst.FSTCompletionLookup.lookup(FSTCompletionLookup.java:237)
at
org.apache.solr.spelling.suggest.Suggester.getSuggestions(Suggester.java:190)
at
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:172)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1699) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722) 500

My suggest searchcomponent and request handler are as below:


 searchComponent class=solr.SpellCheckComponent name=suggest
   lst name=spellchecker
 str name=namesuggest/str
 str name=classnameorg.apache.solr.spelling.suggest.Suggester/str
 str
name=lookupImplorg.apache.solr.spelling.suggest.fst.FSTLookup/str
 str name=fieldspell_check/str
 float name=threshold0.005/float
 str name=buildOnCommittrue/str

   /lst
 /searchComponent


 requestHandler class=org.apache.solr.handler.component.SearchHandler
name=/suggest
   lst name=defaults
 str name=spellchecktrue/str
 str name=spellcheck.dictionarysuggest/str
 str name=spellcheck.onlyMorePopulartrue/str
 str name=spellcheck.count5/str
 str name=spellcheck.collatetrue/str
   /lst
   arr name=components
 strsuggest/str
   /arr
 /requestHandler

Can anyone point out what I'm doing wrong here?

Thanks



--
View this message in context: 
http://lucene.472066.n3.nabble.com/NULL-POINTER-EXCEPTION-WITH-SOLR-SUGGESTER-tp4032763.html
Sent from the Solr - User mailing list archive at Nabble.com. 



Re: Null Pointer Exception on DIH with MySQL

2012-08-30 Thread Aleksey Vorona
Thank you for the reply. We rebuilt solr from sources, reinstalled it 
and the problem went away. As it was never reproducible on any other 
server, I blame some mysterious java byte code corruption on that 
server. The assumption I would never be able to verify, because we did 
not make a copy of the previous binaries.


-- Aleksey

On 12-08-29 06:17 PM, Erick Erickson wrote:

Not much information to go on here, have you tried the DIH
debugging console? See:
http://wiki.apache.org/solr/DataImportHandler#interactive

Best
Erick

On Mon, Aug 27, 2012 at 7:22 PM, Aleksey Vorona avor...@ea.com wrote:

We have Solr 3.6.1 running on Jetty (7.x) and using DIH to get data from the
MySQL database. On one of the environment the import always fails with an
exception: http://pastebin.com/tG28cHPe

It is a null pointer exception on connection being null. I've tested that I
can connect from the Solr server to Mysql server via command line mysql
client.

Does anybody knows anything about this exception and how to fix it?

I am not able to reproduce it on any other environment.

-- Aleksey




Re: Null Pointer Exception on DIH with MySQL

2012-08-30 Thread Erick Erickson
I really, really, really _hate_ it when I have to blame mysterious
corruptions and the problem magically goes away, it leaves
me worried that the problem is just lurking out there
somewhere waiting...waitingwaiting with my name on it
G...

Anyway, thanks for bringing closure to this.

Erick

On Thu, Aug 30, 2012 at 2:01 AM, Aleksey Vorona avor...@ea.com wrote:
 Thank you for the reply. We rebuilt solr from sources, reinstalled it and
 the problem went away. As it was never reproducible on any other server, I
 blame some mysterious java byte code corruption on that server. The
 assumption I would never be able to verify, because we did not make a copy
 of the previous binaries.

 -- Aleksey


 On 12-08-29 06:17 PM, Erick Erickson wrote:

 Not much information to go on here, have you tried the DIH
 debugging console? See:
 http://wiki.apache.org/solr/DataImportHandler#interactive

 Best
 Erick

 On Mon, Aug 27, 2012 at 7:22 PM, Aleksey Vorona avor...@ea.com wrote:

 We have Solr 3.6.1 running on Jetty (7.x) and using DIH to get data from
 the
 MySQL database. On one of the environment the import always fails with an
 exception: http://pastebin.com/tG28cHPe

 It is a null pointer exception on connection being null. I've tested that
 I
 can connect from the Solr server to Mysql server via command line mysql
 client.

 Does anybody knows anything about this exception and how to fix it?

 I am not able to reproduce it on any other environment.

 -- Aleksey




Re: Null Pointer Exception on DIH with MySQL

2012-08-29 Thread Erick Erickson
Not much information to go on here, have you tried the DIH
debugging console? See:
http://wiki.apache.org/solr/DataImportHandler#interactive

Best
Erick

On Mon, Aug 27, 2012 at 7:22 PM, Aleksey Vorona avor...@ea.com wrote:
 We have Solr 3.6.1 running on Jetty (7.x) and using DIH to get data from the
 MySQL database. On one of the environment the import always fails with an
 exception: http://pastebin.com/tG28cHPe

 It is a null pointer exception on connection being null. I've tested that I
 can connect from the Solr server to Mysql server via command line mysql
 client.

 Does anybody knows anything about this exception and how to fix it?

 I am not able to reproduce it on any other environment.

 -- Aleksey


Re: Null Pointer Exception in SOLR

2012-05-03 Thread Erick Erickson
Hmmm, can we have some more details here? What version of Solr? What
exactly did you do in the UI? What was the state of your index (i.e. adding
documents from some other process? etc.).

Best
Erick

On Wed, May 2, 2012 at 8:17 AM, mechravi25 mechrav...@yahoo.co.in wrote:
 Hi,


 When I tried to remove a data from UI (which will in turn hit SOLR), the
 whole application got stuck up. When we took the log files of the UI, we
 could see that this set of requests did not reach SOLR itself. In the SOLR
 log file, we were able to find the following exception occuring at the same
 time.


 SEVERE: org.apache.solr.common.SolrException:
 null__javalangNullPointerException_

 null__javalangNullPointerException_

 request: http://solr/coreX/select
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request
        at org.apache.solr.handler.component.HttpCommComponent$1.call
        at org.apache.solr.handler.component.HttpCommComponent$1.call
        at java.util.concurrent.FutureTask$Sync.innerRun
        at java.util.concurrent.FutureTask.run
        at java.util.concurrent.Executors$RunnableAdapter.call
        at java.util.concurrent.FutureTask$Sync.innerRun
        at java.util.concurrent.FutureTask.run
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
        at java.util.concurrent.ThreadPoolExecutor$Worker.run
        at java.lang.Thread.run


 This situation resulted for another few hours. No one was able to perform
 any operation with the application and If any one tried to perform any
 action, it resulted in the above exception during that period. But, this
 situation resolved by itself after few hours and it started working like
 normal. Can you tell me if this situation was due to deadlock condition or
 was it due to the CPU utilization going beyond 100%? If it was due to the
 deadloack, then why did we not get any such messages in the log files?Or is
 it due to some other problem?Am I missing anything? Can you guide me on
 this?


 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-in-SOLR-tp3954952.html
 Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception in SOLR

2012-05-03 Thread mechravi25
Hi,


I'm using the following configuration for solr

Solr Specification Version: 1.4.0.2010.01.13.08.09.44 
Solr Implementation Version: 1.5-dev exported - yonik - 2010-01-13 08:09:44 
Lucene Specification Version: 2.9.1-dev 
Lucene Implementation Version: 2.9.1-dev 888785 - 2009-12-09 18:03:31 
Current Time: Thu May 03 05:38:12 MST 2012 
Server Start Time:Wed May 02 03:45:58 MST 2012 

I was trying to delete a part of a document from the UI. In this situation,
the index file got updated only after 2hrs when the application unfroze.

Here, I also observed that I was getting the following Highlighting error
mostly. Is there a problem with using this highlighting feature?

INFO: [corex] webapp=/solr path=/select
params={facet=truef.CFacet.facet.limit=160hl.fl=*wt=javabinhl=falserows=2version=1f.rFacet.facet.limit=160fl=uxid,schstart=0f.tFacet.facet.limit=160q=uxid:Plan
for
Todayfacet.field=CFacetfacet.field=tFacetfacet.field=rFacet?=isShard=truefs=true}
hits=1 status=0 QTime=6
 
SEVERE: java.lang.NullPointerException
*at
org.apache.solr.highlight.SolrHighlighter.getHighlightFields
at
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting*   
at
org.apache.solr.handler.component.HighlightComponent.process
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody 
at org.apache.solr.handler.RequestHandlerBase.handleRequest
at org.apache.solr.core.SolrCore.execute
at org.apache.solr.servlet.SolrDispatchFilter.execute
at org.apache.solr.servlet.SolrDispatchFilter.doFilter
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
at org.mortbay.jetty.servlet.ServletHandler.handle
at org.mortbay.jetty.security.SecurityHandler.handle
at org.mortbay.jetty.servlet.SessionHandler.handle
at org.mortbay.jetty.handler.ContextHandler.handle
at org.mortbay.jetty.webapp.WebAppContext.handle
at org.mortbay.jetty.handler.ContextHandlerCollection.handle
at org.mortbay.jetty.handler.HandlerCollection.handle
at org.mortbay.jetty.handler.HandlerWrapper.handle
at org.mortbay.jetty.Server.handle
at org.mortbay.jetty.HttpConnection.handleRequest
at org.mortbay.jetty.HttpConnection$RequestHandler.content
at org.mortbay.jetty.HttpParser.parseNext
at org.mortbay.jetty.HttpParser.parseAvailable
at org.mortbay.jetty.HttpConnection.handle
at org.mortbay.jetty.bio.SocketConnector$Connection.run
at org.mortbay.thread.BoundedThreadPool$PoolThread.run





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-in-SOLR-tp3954952p3959151.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Which version of Solr? 1.4?, 1.4.1? 3.x branch? trunk? if the 3.x or the 
trunk, when did you pull it?


andrewdps wrote:

What could be possible error for

14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
SEVERE: java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
at java.util.concurrent.FutureTask.get(libgcj.so.90)
at
org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:439)
at
org.apache.solr.update.DirectUpdateHandler2$CommitTracker.run(DirectUpdateHandler2.java:602)
at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.90)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$2(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
at java.lang.Thread.run(libgcj.so.90)
Caused by: java.lang.NullPointerException
at
org.apache.solr.search.FastLRUCache.getStatistics(FastLRUCache.java:252)
at org.apache.solr.search.FastLRUCache.toString(FastLRUCache.java:280)
at java.lang.StringBuilder.append(libgcj.so.90)
at
org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:223)
at org.apache.solr.core.SolrCore$6.close(SolrCore.java:1246)
at org.apache.solr.util.RefCounted.decref(RefCounted.java:57)
at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1192)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
...3 more

I get this error(after indexing a few records I get the above error and
again starts indexing.i get the same error after indexing few hundred
records) when I try to index the marc record on the server.I worked fine on
the local system.

Thanks
   


Re: Null Pointer Exception while indexing

2010-09-16 Thread Israel Ekpo
Try removing the data directory and then restart your Servlet container and
see if that helps.

On Thu, Sep 16, 2010 at 3:28 AM, Lance Norskog goks...@gmail.com wrote:

 Which version of Solr? 1.4?, 1.4.1? 3.x branch? trunk? if the 3.x or the
 trunk, when did you pull it?


 andrewdps wrote:

 What could be possible error for

 14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
 SEVERE: java.util.concurrent.ExecutionException:
 java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)
at java.util.concurrent.FutureTask.get(libgcj.so.90)
at

 org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:439)
at

 org.apache.solr.update.DirectUpdateHandler2$CommitTracker.run(DirectUpdateHandler2.java:602)
at java.util.concurrent.Executors$RunnableAdapter.call(libgcj.so.90)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
at

 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$2(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(libgcj.so.90)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(libgcj.so.90)
at java.lang.Thread.run(libgcj.so.90)
 Caused by: java.lang.NullPointerException
at
 org.apache.solr.search.FastLRUCache.getStatistics(FastLRUCache.java:252)
at org.apache.solr.search.FastLRUCache.toString(FastLRUCache.java:280)
at java.lang.StringBuilder.append(libgcj.so.90)
at
 org.apache.solr.search.SolrIndexSearcher.close(SolrIndexSearcher.java:223)
at org.apache.solr.core.SolrCore$6.close(SolrCore.java:1246)
at org.apache.solr.util.RefCounted.decref(RefCounted.java:57)
at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1192)
at java.util.concurrent.FutureTask$Sync.innerRun(libgcj.so.90)
at java.util.concurrent.FutureTask.run(libgcj.so.90)
...3 more

 I get this error(after indexing a few records I get the above error and
 again starts indexing.i get the same error after indexing few hundred
 records) when I try to index the marc record on the server.I worked fine
 on
 the local system.

 Thanks





-- 
°O°
Good Enough is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/


Re: Null Pointer Exception while indexing

2010-09-16 Thread Yonik Seeley
On Wed, Sep 15, 2010 at 2:01 PM, andrewdps mstpa...@gmail.com wrote:
 I still get the same error when I try to index the mrc file...

If you get the exact same error, then you are still using GCJ.
When you type java it's probably going to GCJ because of your path
(i.e. change it or directly specify the path to the new JVM you just
installed).

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Thanks for all the suggestions.

As far as JAVA is concerned,I'm worried to see different things.I'm afraid
if things are going wrong with the settings.

r...@zoombox:/etc# echo $JAVA_HOME
/usr/lib/jvm/default-java
r...@zoombox:/etc# java -version
java version 1.6.0_0
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
r...@zoombox:/etc# locate javac |grep bin
/usr/bin/javac
/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/bin/javac
/usr/lib/jvm/java-6-sun-1.6.0.20/bin/javac

I've many sub-directories in JVM directory

default-java
java-6-sun-1.6.0.20
java-6-sun
java-6-openjdk
java-1.5.0-gcj-4.3-1.5.0.0
java-gcj

and the /etc/profile looks like

/etc# more profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
  . $i
fi
  done
  unset i
fi

if [ $PS1 ]; then
  if [ $BASH ]; then
PS1='\...@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
  else
if [ `id -u` -eq 0 ]; then
  PS1='# '
else
  PS1='$ '
fi
  fi
fi

umask 022
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20
export PATH=$JAVA_HOME/bin:$PATH

Please let me know what went wrong.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488279.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Also,the solr Java properties looks like this using gcj,despite setting
java_home in /etc/profile

jetty.logs = /usr/local/vufind/solr/jetty/logs
path.separator = :
java.vm.name = GNU libgcj
java.vm.specification.name = Java(tm) Virtual Machine Specification
java.runtime.version = 1.5.0
java.home = /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
java.vm.specification.version = 1.0
line.separator = 


-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488292.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread andrewdps

Lance,

We are on Solr Specification Version: 1.4.1
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-16 Thread Thomas Joiner
My guess would be that Jetty has some configuration somewhere that is
telling it to use GCJ.  Is it possible to completely remove GCJ from the
system?  Another possibility would be to uninstall Jetty, and then reinstall
it, and hope that on the reinstall it would pick up on the OpenJDK.

What distro of linux are you using?  It probably depends on that how to set
the JVM.

On Thu, Sep 16, 2010 at 10:22 AM, andrewdps mstpa...@gmail.com wrote:


 Lance,

 We are on Solr Specification Version: 1.4.1
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Good eye, Thomas! Yes, GCJ is a non-starter. You're best off downloading 
Java 1.6 yourself, but I understand that it is easier to use the public 
package repositories.


Thomas Joiner wrote:

My guess would be that Jetty has some configuration somewhere that is
telling it to use GCJ.  Is it possible to completely remove GCJ from the
system?  Another possibility would be to uninstall Jetty, and then reinstall
it, and hope that on the reinstall it would pick up on the OpenJDK.

What distro of linux are you using?  It probably depends on that how to set
the JVM.

On Thu, Sep 16, 2010 at 10:22 AM, andrewdpsmstpa...@gmail.com  wrote:

   

Lance,

We are on Solr Specification Version: 1.4.1
--
View this message in context:
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1488320.html
Sent from the Solr - User mailing list archive at Nabble.com.

 
   


Re: Null Pointer Exception while indexing

2010-09-16 Thread Lance Norskog
Andrew, you should download Solr from the apache site. This packaging is 
wrong-headed.


As to Java, a Linux person would know the system for picking which is 
the standard Java.


andrewdps wrote:

Also,the solr Java properties looks like this using gcj,despite setting
java_home in /etc/profile

jetty.logs = /usr/local/vufind/solr/jetty/logs
path.separator = :
java.vm.name = GNU libgcj
java.vm.specification.name = Java(tm) Virtual Machine Specification
java.runtime.version = 1.5.0
java.home = /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
java.vm.specification.version = 1.0
line.separator =


   


Re: Null Pointer Exception while indexing

2010-09-15 Thread Yonik Seeley
On Wed, Sep 15, 2010 at 1:12 PM, andrewdps mstpa...@gmail.com wrote:

 What could be possible error for

 14-Sep-10 4:28:47 PM org.apache.solr.common.SolrException log
 SEVERE: java.util.concurrent.ExecutionException:
 java.lang.NullPointerException
   at java.util.concurrent.FutureTask$Sync.innerGet(libgcj.so.90)

You're using GCJ, which isn't supported.  Use the Sun (now Oracle)
JVM, OpenJDK, or IBM's JVM.

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception while indexing

2010-09-15 Thread andrewdps

I'm sorry,but how do I use that.Is that something to do with uninstalling
gcu and installing jvm and openJDK?

Thanks
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1481285.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null Pointer Exception while indexing

2010-09-15 Thread andrewdps

I still get the same error when I try to index the mrc file...

This was the previous version of the Java on our server.
# java -version
java version 1.5.0
gij (GNU libgcj) version 4.3.2

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And then I've installed openjdk which gives me

# java -version
java version 1.6.0_0
OpenJDK  Runtime Environment (build 1.6.0_0-b11)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

Am I doing fine with the installation.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-Pointer-Exception-while-indexing-tp1481154p1481410.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception when mixing highlighter shards q.alt

2010-09-14 Thread Chris Hostetter

I didn't see any open Jira issues for this, so i created one...

https://issues.apache.org/jira/browse/SOLR-2121

: Date: Tue, 7 Sep 2010 01:35:39 -0700 (PDT)
: From: Marc Sturlese marc.sturl...@gmail.com
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: Null pointer exception when mixing highlighter  shards  q.alt
: 
: 
: I noticed that long ago.
: Fixed it doing in HighlightComponent finishStage:
:   @Override
:   public void finishStage(ResponseBuilder rb) {
: boolean hasHighlighting = true ;
: if (rb.doHighlights  rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
: 
:   Map.EntryString, Object[] arr = new
: NamedList.NamedListEntry[rb.resultIds.size()];
: 
:   // TODO: make a generic routine to do automatic merging of id keyed
: data
:   for (ShardRequest sreq : rb.finished) {
: if ((sreq.purpose  ShardRequest.PURPOSE_GET_HIGHLIGHTS) == 0)
: continue;
: for (ShardResponse srsp : sreq.responses) {
:   NamedList hl =
: (NamedList)srsp.getSolrResponse().getResponse().get(highlighting);
:   //patch bug
:   if(hl != null) {
: for (int i=0; ihl.size(); i++) {
:  String id = hl.getName(i);
:  ShardDoc sdoc = rb.resultIds.get(id);
:  int idx = sdoc.positionInResponse;
:  arr[idx] = new NamedList.NamedListEntry(id, hl.getVal(i));
: }
:   } else {
: hasHighlighting = false;
:   }
: }
:   }
: 
:   // remove nulls in case not all docs were able to be retrieved
:   //patch bug
:   if(hasHighlighting) {
: rb.rsp.add(highlighting, removeNulls(new SimpleOrderedMap(arr)));
:   }
: }
:   }
: -- 
: View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-when-mixing-highlighter-shards-q-alt-tp1430353p1431253.html
: Sent from the Solr - User mailing list archive at Nabble.com.
: 

-Hoss

--
http://lucenerevolution.org/  ...  October 7-8, Boston
http://bit.ly/stump-hoss  ...  Stump The Chump!



Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-10 Thread Ron Mayer
Ron Mayer wrote:
 Yonik Seeley wrote:
 I just checked in the last part of those changes that should eliminate
 any restriction on key.
 But, that last part dealt with escaping keys that contained whitespace or }
 Your example really should have worked after my previous 2 commits.
 Perhaps not all of the servers got successfully upgraded?
 
 Yes, quite possible.
 
 Can you try trunk again now?
 
 Will check sometime tomorrow.


Yes, looks good now.
Thanks!



Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-10 Thread Yonik Seeley
On Fri, Sep 10, 2010 at 7:21 PM, Ron Mayer r...@0ape.com wrote:
 Ron Mayer wrote:
 Yes, looks good now.
 Thanks!

Great, thanks for the report!

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-08 Thread Yonik Seeley
On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer r...@0ape.com wrote:
 Short summary:
  * Mixing Facets and Shards give me a NullPointerException
    when not all docs have all facets.

https://issues.apache.org/jira/browse/SOLR-2110

I believe the underlying real issue stemmed from your use of a complex
key involvement/race_facet.

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8


Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-08 Thread Ron Mayer
Yonik Seeley wrote:
 On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer r...@0ape.com wrote:
 Short summary:
  * Mixing Facets and Shards give me a NullPointerException
when not all docs have all facets.
 
 https://issues.apache.org/jira/browse/SOLR-2110
 
 I believe the underlying real issue stemmed from your use of a complex
 key involvement/race_facet.

Thanks!Yes - that looks like the actual reason, rather than what
I was guessing. I spent a while this morning trying to reproduce the
problem with a simpler example, and wasn't able to - probably because
I overlooked that part.


I see changes have been made (based on comments in) SOLR-2110 and
SOLR-2111, so I'll try with the current trunk..
 [trying now with trunk as of a few minutes ago]
Looking much better.

I'm seeing this in the log files:
SEVERE: Exception during facet.field of 
{!terms=$involvement/gender_facet__terms}involvement/gender_facet:org.a
pache.lucene.queryParser.ParseException: Expected identifier at pos 20 
str='{!terms=$involvement/gender_facet__
terms}involvement/gender_facet'
at 
org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
at 
org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
...
but at least I'm getting results, and results that look right for both the body 
of
the document and for most of the facets.

Perhaps next thing I try will be simplifying my keys for my own sanity as much
as for solr's.


Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-08 Thread Yonik Seeley
I just checked in the last part of those changes that should eliminate
any restriction on key.
But, that last part dealt with escaping keys that contained whitespace or }
Your example really should have worked after my previous 2 commits.
Perhaps not all of the servers got successfully upgraded?
Can you try trunk again now?

-Yonik
http://lucenerevolution.org  Lucene/Solr Conference, Boston Oct 7-8

On Wed, Sep 8, 2010 at 6:28 PM, Ron Mayer r...@0ape.com wrote:
 Yonik Seeley wrote:
 On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer r...@0ape.com wrote:
 Short summary:
  * Mixing Facets and Shards give me a NullPointerException
    when not all docs have all facets.

 https://issues.apache.org/jira/browse/SOLR-2110

 I believe the underlying real issue stemmed from your use of a complex
 key involvement/race_facet.

 Thanks!    Yes - that looks like the actual reason, rather than what
 I was guessing. I spent a while this morning trying to reproduce the
 problem with a simpler example, and wasn't able to - probably because
 I overlooked that part.


 I see changes have been made (based on comments in) SOLR-2110 and
 SOLR-2111, so I'll try with the current trunk..
     [trying now with trunk as of a few minutes ago]
 Looking much better.

 I'm seeing this in the log files:
 SEVERE: Exception during facet.field of 
 {!terms=$involvement/gender_facet__terms}involvement/gender_facet:org.a
 pache.lucene.queryParser.ParseException: Expected identifier at pos 20 
 str='{!terms=$involvement/gender_facet__
 terms}involvement/gender_facet'
        at 
 org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
        at 
 org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
        ...
 but at least I'm getting results, and results that look right for both the 
 body of
 the document and for most of the facets.

 Perhaps next thing I try will be simplifying my keys for my own sanity as much
 as for solr's.



Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-08 Thread Ron Mayer
Yonik Seeley wrote:
 I just checked in the last part of those changes that should eliminate
 any restriction on key.
 But, that last part dealt with escaping keys that contained whitespace or }
 Your example really should have worked after my previous 2 commits.
 Perhaps not all of the servers got successfully upgraded?

Yes, quite possible.

 Can you try trunk again now?

Will check sometime tomorrow.


Re: Null pointer exception when mixing highlighter shards q.alt

2010-09-07 Thread Marc Sturlese

I noticed that long ago.
Fixed it doing in HighlightComponent finishStage:
  @Override
  public void finishStage(ResponseBuilder rb) {
boolean hasHighlighting = true ;
if (rb.doHighlights  rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {

  Map.EntryString, Object[] arr = new
NamedList.NamedListEntry[rb.resultIds.size()];

  // TODO: make a generic routine to do automatic merging of id keyed
data
  for (ShardRequest sreq : rb.finished) {
if ((sreq.purpose  ShardRequest.PURPOSE_GET_HIGHLIGHTS) == 0)
continue;
for (ShardResponse srsp : sreq.responses) {
  NamedList hl =
(NamedList)srsp.getSolrResponse().getResponse().get(highlighting);
  //patch bug
  if(hl != null) {
for (int i=0; ihl.size(); i++) {
 String id = hl.getName(i);
 ShardDoc sdoc = rb.resultIds.get(id);
 int idx = sdoc.positionInResponse;
 arr[idx] = new NamedList.NamedListEntry(id, hl.getVal(i));
}
  } else {
hasHighlighting = false;
  }
}
  }

  // remove nulls in case not all docs were able to be retrieved
  //patch bug
  if(hasHighlighting) {
rb.rsp.add(highlighting, removeNulls(new SimpleOrderedMap(arr)));
  }
}
  }
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Null-pointer-exception-when-mixing-highlighter-shards-q-alt-tp1430353p1431253.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Null pointer exception when mixing highlighter shards q.alt

2010-09-07 Thread Ron Mayer
Marc Sturlese wrote:
 I noticed that long ago.
 Fixed it doing in HighlightComponent finishStage:
 ...
   public void finishStage(ResponseBuilder rb) {
...
   }

Thanks!   I'll try that


I also seem to have a similar problem with shards + facets -- in particular
it seems like the error occurrs when some of the shards have no values for
some of the facets.

Any chance you (or anyone else) have a fix for that one too?

Here's the backtrace I'm getting from a few day old svn trunk.

Sep 7, 2010 6:03:58 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at 
org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
at 
org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-07 Thread Yonik Seeley
Thanks for the report Ron, can you open a JIRA issue?
What version of Solr is this?

-Yonik
http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8


On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer r...@0ape.com wrote:
 Short summary:
  * Mixing Facets and Shards give me a NullPointerException
    when not all docs have all facets.
  * Attached patch improves the failure mode, but still
    spews errors in the log file
  * Suggestions how to fix that would be appreciated.


 In my system, I tried separating out a couple similar but different
 types of documents into a couple different shards.

 Both shards have the identical schema; with the facets defined as a 
 dynamicfield:
  dynamicField name=*_facet        type=string     indexed=true  
 stored=false multiValued=true  /
 Some facets only have documents with a value for them in the first shard,
 Other facets only have documents with a value for them in the second shard.

 When I try to do a query that asks for a facet.field that's only
 has values in the first shard, and for a different facet.field
 that only has values in the second shard, I'm getting this
 exception:

 Sep 7, 2010 4:55:38 PM org.apache.solr.common.SolrException log
 SEVERE: java.lang.NullPointerException
        at 
 org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
        at 
 org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
        at 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
        at 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
        at 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
        at 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
        at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at 
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

 I don't have a real simple test case yet; but could work on one if
 it'd make it easier to track down.    Also, I could post the schema
 and solrconfig if that'd help.





 The attached patch seems to mostly work for me; in that it's returning
 valid search results and at least some facet information, but with
 that patch I'm then getting this exception showing up:

 Sep 7, 2010 5:28:30 PM org.apache.solr.common.SolrException log
 SEVERE: Exception during facet 
 counts:org.apache.lucene.queryParser.ParseException: Expected identifier at 
 pos 20 str='{!terms=$involvement/race_facet__terms}involvement/race_facet'
        at 
 org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
        at 
 org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
        at 
 org.apache.solr.search.QueryParsing.getLocalParams(QueryParsing.java:221)
        at 
 org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:102)
        at 
 org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:327)
        at 
 org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:188)
        at 
 org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:72)
        at 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
        at 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
        at 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
       

Re: Null Pointer Exception with shardsfacets where some shards have no values for some facets.

2010-09-07 Thread Ron Mayer
Yonik Seeley wrote:
 Thanks for the report Ron, can you open a JIRA issue?

Sure.  I'll do it at work tomorrow morning, hopefully
after I try to verify with a standalone test case.

 What version of Solr is this?

This is trunk as of a few days ago.   I can update to
the latest trunk and check there too.


 -Yonik
 http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8
 
 
 On Tue, Sep 7, 2010 at 8:31 PM, Ron Mayer r...@0ape.com wrote:
 Short summary:
  * Mixing Facets and Shards give me a NullPointerException
when not all docs have all facets.
  * Attached patch improves the failure mode, but still
spews errors in the log file
  * Suggestions how to fix that would be appreciated.


 In my system, I tried separating out a couple similar but different
 types of documents into a couple different shards.

 Both shards have the identical schema; with the facets defined as a 
 dynamicfield:
  dynamicField name=*_facettype=string indexed=true  
 stored=false multiValued=true  /
 Some facets only have documents with a value for them in the first shard,
 Other facets only have documents with a value for them in the second shard.

 When I try to do a query that asks for a facet.field that's only
 has values in the first shard, and for a different facet.field
 that only has values in the second shard, I'm getting this
 exception:

 Sep 7, 2010 4:55:38 PM org.apache.solr.common.SolrException log
 SEVERE: java.lang.NullPointerException
at 
 org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:340)
at 
 org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:232)
at 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:301)
at 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at 
 org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
 org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at 
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

 I don't have a real simple test case yet; but could work on one if
 it'd make it easier to track down.Also, I could post the schema
 and solrconfig if that'd help.





 The attached patch seems to mostly work for me; in that it's returning
 valid search results and at least some facet information, but with
 that patch I'm then getting this exception showing up:

 Sep 7, 2010 5:28:30 PM org.apache.solr.common.SolrException log
 SEVERE: Exception during facet 
 counts:org.apache.lucene.queryParser.ParseException: Expected identifier at 
 pos 20 str='{!terms=$involvement/race_facet__terms}involvement/race_facet'
at 
 org.apache.solr.search.QueryParsing$StrParser.getId(QueryParsing.java:718)
at 
 org.apache.solr.search.QueryParsing.parseLocalParams(QueryParsing.java:165)
at 
 org.apache.solr.search.QueryParsing.getLocalParams(QueryParsing.java:221)
at 
 org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:102)
at 
 org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:327)
at 
 org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:188)
at 
 org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:72)
at 
 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
at 
 

Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema=true)

2009-03-19 Thread Sam Keen
guess I spoke to soon.  The above setup (with Shalin's fix) works for
a mock run of 2 records.  But when I try it with the production data
of about 450 records, I get this error.

again, any help is greatly appreciated

sam keen

Mar 19, 2009 3:59:20 PM
org.apache.solr.handler.dataimport.DataImporter doFullImport
INFO: Starting Full Import
Mar 19, 2009 3:59:20 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/dataimport params={command=full-import}
status=0 QTime=6
Mar 19, 2009 3:59:20 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
Mar 19, 2009 3:59:20 PM
org.apache.solr.handler.dataimport.HttpDataSource getData
INFO: Created URL to: http://local.smwe.com/factsheets/feed
Mar 19, 2009 3:59:36 PM
org.apache.solr.handler.dataimport.DataImporter doFullImport
SEVERE: Full Import failed
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
Index: 3, Size: 3
at 
org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:85)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:226)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
at 
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
at 
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.readRow(XPathEntityProcessor.java:266)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor.access$100(XPathEntityProcessor.java:53)
at 
org.apache.solr.handler.dataimport.XPathEntityProcessor$1.handle(XPathEntityProcessor.java:229)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:149)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
at 
org.apache.solr.handler.dataimport.XPathRecordReader$Node.access$000(XPathRecordReader.java:89)
at 
org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:82)
... 9 more




On Wed, Mar 18, 2009 at 2:58 PM, Sam Keen sam@gmail.com wrote:
 that worked perfectly Shalin.  thanks so much for your help!

 sam keen


 On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
 shalinman...@gmail.com wrote:
 On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen sam@gmail.com wrote:


 What I am now attempting to do is leverage 'useSolrAddSchema=true' .
 I have a URL the responds with a well formatted solr add xml (I'm able
 to add it by POSTing).  But when I try to add it using
 http://localhost:8983/solr/dataimport?command=full-import i get a null
 pointer exception.


 You need to use XPathEntityProcessor. If you do not specify a processor, the
 default is SqlEntityProcessor (used for DB imports).

 Add the attribute processor=XPathEntityProcessor to the entity and try.

 --
 Regards,
 Shalin Shekhar Mangar.




Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema=true)

2009-03-19 Thread Noble Paul നോബിള്‍ नोब्ळ्
it is a bug , I have raised an issue

https://issues.apache.org/jira/browse/SOLR-1077

On Fri, Mar 20, 2009 at 4:41 AM, Sam Keen sam@gmail.com wrote:
 guess I spoke to soon.  The above setup (with Shalin's fix) works for
 a mock run of 2 records.  But when I try it with the production data
 of about 450 records, I get this error.

 again, any help is greatly appreciated

 sam keen

 Mar 19, 2009 3:59:20 PM
 org.apache.solr.handler.dataimport.DataImporter doFullImport
 INFO: Starting Full Import
 Mar 19, 2009 3:59:20 PM org.apache.solr.core.SolrCore execute
 INFO: [] webapp=/solr path=/dataimport params={command=full-import}
 status=0 QTime=6
 Mar 19, 2009 3:59:20 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll
 INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
 Mar 19, 2009 3:59:20 PM
 org.apache.solr.handler.dataimport.HttpDataSource getData
 INFO: Created URL to: http://local.smwe.com/factsheets/feed
 Mar 19, 2009 3:59:36 PM
 org.apache.solr.handler.dataimport.DataImporter doFullImport
 SEVERE: Full Import failed
 java.lang.RuntimeException: java.lang.IndexOutOfBoundsException:
 Index: 3, Size: 3
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:85)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor.initQuery(XPathEntityProcessor.java:226)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor.fetchNextRow(XPathEntityProcessor.java:180)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor.nextRow(XPathEntityProcessor.java:163)
        at 
 org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:285)
        at 
 org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
        at 
 org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
        at 
 org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
        at 
 org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
        at 
 org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:377)
 Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
        at java.util.ArrayList.RangeCheck(ArrayList.java:546)
        at java.util.ArrayList.get(ArrayList.java:321)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor.readRow(XPathEntityProcessor.java:266)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor.access$100(XPathEntityProcessor.java:53)
        at 
 org.apache.solr.handler.dataimport.XPathEntityProcessor$1.handle(XPathEntityProcessor.java:229)
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:149)
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader$Node.parse(XPathRecordReader.java:174)
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader$Node.access$000(XPathRecordReader.java:89)
        at 
 org.apache.solr.handler.dataimport.XPathRecordReader.streamRecords(XPathRecordReader.java:82)
        ... 9 more




 On Wed, Mar 18, 2009 at 2:58 PM, Sam Keen sam@gmail.com wrote:
 that worked perfectly Shalin.  thanks so much for your help!

 sam keen


 On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
 shalinman...@gmail.com wrote:
 On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen sam@gmail.com wrote:


 What I am now attempting to do is leverage 'useSolrAddSchema=true' .
 I have a URL the responds with a well formatted solr add xml (I'm able
 to add it by POSTing).  But when I try to add it using
 http://localhost:8983/solr/dataimport?command=full-import i get a null
 pointer exception.


 You need to use XPathEntityProcessor. If you do not specify a processor, the
 default is SqlEntityProcessor (used for DB imports).

 Add the attribute processor=XPathEntityProcessor to the entity and try.

 --
 Regards,
 Shalin Shekhar Mangar.






-- 
--Noble Paul


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema=true)

2009-03-18 Thread Shalin Shekhar Mangar
On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen sam@gmail.com wrote:


 What I am now attempting to do is leverage 'useSolrAddSchema=true' .
 I have a URL the responds with a well formatted solr add xml (I'm able
 to add it by POSTing).  But when I try to add it using
 http://localhost:8983/solr/dataimport?command=full-import i get a null
 pointer exception.


You need to use XPathEntityProcessor. If you do not specify a processor, the
default is SqlEntityProcessor (used for DB imports).

Add the attribute processor=XPathEntityProcessor to the entity and try.

-- 
Regards,
Shalin Shekhar Mangar.


Re: Null pointer exception on use of ImportDataHandler (useSolrAddSchema=true)

2009-03-18 Thread Sam Keen
that worked perfectly Shalin.  thanks so much for your help!

sam keen


On Wed, Mar 18, 2009 at 1:15 PM, Shalin Shekhar Mangar
shalinman...@gmail.com wrote:
 On Thu, Mar 19, 2009 at 1:29 AM, Sam Keen sam@gmail.com wrote:


 What I am now attempting to do is leverage 'useSolrAddSchema=true' .
 I have a URL the responds with a well formatted solr add xml (I'm able
 to add it by POSTing).  But when I try to add it using
 http://localhost:8983/solr/dataimport?command=full-import i get a null
 pointer exception.


 You need to use XPathEntityProcessor. If you do not specify a processor, the
 default is SqlEntityProcessor (used for DB imports).

 Add the attribute processor=XPathEntityProcessor to the entity and try.

 --
 Regards,
 Shalin Shekhar Mangar.



RE: Null pointer exception

2007-05-15 Thread Chris Hostetter

: I decided to trash the whole installation and start again. I downloaded
: last nights build and untarred it. Put the .war into
: $TOMCAT_HOME/webapps. Copied the example/solr directory as
: /var/www/html/solr. No JNDI file this time, just updated solrconfig to
: read /var/www/html/solr as my data.dir.

if you don't use JNDI or a system property to point solr at your
/var/www/html/solr directory, then it's never going to be able to find
your solrconfig.xml to know where your data directory is.

with a setup like that, besides the error you got in your browser trying
to load the admin page, you should have seen an exception in (one of) the
tomcat logs on startup, most likely a NoClassDefFoundError ... if you
dont' see an excpetion like that then you are *definiely* not seeing all
of your errors, maybe you've got ctomcat configured to not log them, or
maybe it's logging them someplace you arent' expecting, because based on
what you described you would definitely get one.




-Hoss



Re: Null pointer exception

2007-05-14 Thread Chris Hostetter
: I have tried indexing from the exampledocs which is just sitting in my
: user home directory but now I get a null pointer exception after
: running:

just to clarify: are you using solr 1.1 or a nightly build? did you check
the log file to ensure thatthere are no exceptions when you start tomcat?
are you using the example solrconfig.xml and schema.xml?  have you tried
doing a search first without indexing any docs to see if that executs and
(correctly) returns 0 docs?

If i had to guess, i'd speculate that you aren't correctly using a system
prop or JNDI to point Solr at your solr home dir, so it's not finding the
configs; either that, or you've modified the configs and there is a
syntax error -- either way there should be an exception when the server
starts up, well before you update any docs.


-Hoss



RE: Null pointer exception

2007-05-14 Thread Gary Browne
Thanks a lot for your reply Chris

I am running v1.1.0. If I do a search (from the admin page), it throws
the following exception:

java.lang.RuntimeException: java.io.IOException:
/var/www/html/solr/data/index not a directory

There are no exceptions on starting Tomcat, only one warning regarding
JMS client lib not found (related to Cocoon). I have named a file
solr.xml in my $TOMCAT_HOME/conf/Catalina/localhost directory containing
the following:

Context docBase=/usr/local/tomcat/webapps/solr.war debug=0
crossContext=true
Environment name=solr type=java.lang.String
value=/var/www/html/solr override=true /
/Context

I am using the example configs (unmodified).

Thanks again
Gary


Gary Browne
Development Programmer
Library IT Services
University of Sydney
Australia
ph: 61-2-9351 5946 
-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 15 May 2007 7:27 AM
To: solr-user@lucene.apache.org
Subject: Re: Null pointer exception

: I have tried indexing from the exampledocs which is just sitting in my
: user home directory but now I get a null pointer exception after
: running:

just to clarify: are you using solr 1.1 or a nightly build? did you
check
the log file to ensure thatthere are no exceptions when you start
tomcat?
are you using the example solrconfig.xml and schema.xml?  have you tried
doing a search first without indexing any docs to see if that executs
and
(correctly) returns 0 docs?

If i had to guess, i'd speculate that you aren't correctly using a
system
prop or JNDI to point Solr at your solr home dir, so it's not finding
the
configs; either that, or you've modified the configs and there is a
syntax error -- either way there should be an exception when the server
starts up, well before you update any docs.


-Hoss



RE: Null pointer exception

2007-05-14 Thread Chris Hostetter
: I am running v1.1.0. If I do a search (from the admin page), it throws
: the following exception:
:
: java.lang.RuntimeException: java.io.IOException:
: /var/www/html/solr/data/index not a directory

does /var/www/html/solr/data/ exist? ... if so does the effective userID
for tomcat have permission to write to it?  if not does the effective
userID for tomcat have permission to write to /var/www/html/solr/ ?



-Hoss



RE: Null pointer exception

2007-05-14 Thread Gary Browne
Hi Chris

The /var/www/html/solr/data/ directory did exist. I tried opening up
permissions completely for testing but no luck (the tomcat user had
write permissions).

I decided to trash the whole installation and start again. I downloaded
last nights build and untarred it. Put the .war into
$TOMCAT_HOME/webapps. Copied the example/solr directory as
/var/www/html/solr. No JNDI file this time, just updated solrconfig to
read /var/www/html/solr as my data.dir.

I can access the admin page but when I try an index action from the
commandline, or a search from the admin page, I get something like:

The requested resource (/solr/select/) is not available

I have other apps running under tomcat okay, seems like it can't find
the lib .jars or can't access the classes within them?

Stuck...

Cheers
Gary



Gary Browne
Development Programmer
Library IT Services
University of Sydney
Australia
ph: 61-2-9351 5946 

-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 15 May 2007 9:51 AM
To: solr-user@lucene.apache.org
Subject: RE: Null pointer exception

: I am running v1.1.0. If I do a search (from the admin page), it throws
: the following exception:
:
: java.lang.RuntimeException: java.io.IOException:
: /var/www/html/solr/data/index not a directory

does /var/www/html/solr/data/ exist? ... if so does the effective userID
for tomcat have permission to write to it?  if not does the effective
userID for tomcat have permission to write to /var/www/html/solr/ ?



-Hoss