You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jamie Johnson <je...@gmail.com> on 2012/04/17 04:38:30 UTC

Distributed FacetComponent NullPointer Exception

I found (what appears to be) the issue I am experiencing here
http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
but there were no responses to it.  I've included the stack trace I am
seeing, any ideas why this would happen?


SEVERE: java.lang.NullPointerException
        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
        at org.eclipse.jetty.server.Server.handle(Server.java:351)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Jamie Johnson <je...@gmail.com>.
I tried to clean it up a little bit, but removed too much.  Here is an
example which more closely shows what is in the log.  I changed the
actual data, hopefully I didn't mess it up.

facet=true&tie=0.1&ids=urn:sha256:0bea3adf1415c6c737063122d8abd343b24167bdfc7134a3efaef79b263c0a43&qf=%0a++++++++++author^0.5+type^0.5+content_mvtxt^10++subject_phonetic^1+subject_txt^20%0a+++++++&q.alt=*:*&distrib=false&wt=javabin&se_organizationname_umvs__terms=Test+%0a%0a%0a%0a?+%0a%0a%0a%0aTest+Daily+News,The+Test+Association,Toyota,Washington+Post&version=2&rows=10&rows=10&NOW=1334673365414&shard.url=JamiesMac.local:8502/solr/shard5-core1/&fl=*,score&q=bob&facet.field={!terms%3D$se_organizationname_umvs__terms}se_organizationname_umvs&isShard=true

The only thing I changed (or tried to change) was reducing number of
terms listed in se_organizationname_umvs_terms field

On Tue, Apr 17, 2012 at 10:22 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> facet.field={!terms=$organization__terms}organization
>
> This is referring to another request parameter that Solr should have
> added (organization__terms) .  Did you cut-n-paste all of the
> parameters below?
>
> -Yonik
> lucenerevolution.com - Lucene/Solr Open Source Search Conference.
> Boston May 7-10
>
>
>
> On Tue, Apr 17, 2012 at 10:13 AM, Jamie Johnson <je...@gmail.com> wrote:
>> I'm noticing that this issue seems to be occurring with facet fields
>> which have some unexpected characters.  For instance the query that I
>> see going across the wire is as follows
>>
>> facet=true&tie=0.1&ids=3F2504E0-4F89-11D3-9A0C-0305E82C3301&qf=%0a++++++++++author^0.5+type^0.5+content_mvtxt^10++subject_phonetic^1+subject_txt^20%0a+++++++&q.alt=*:*&distrib=false&Test+%0a%0a%0a%0a?+%0a%0a%0a%0aDaily+News,Test+Association,Toyota,U.S.,Washington+Post&rows=10&rows=10&NOW=1334670761188&shard.url=JamiesMac.local:8502/solr/shard5-core1/&fl=*,score&q=bob&facet.field={!terms%3D$organization__terms}organization&isShard=true
>>
>> Now there is an obvious issue here with our data having these \n
>> characters in it which I will be fixing shortly (plan to use a set of
>> Character replace filters to remove extra white space).  I am assuming
>> that this is causing our issue, but would be nice if someone could
>> confirm.
>>
>>
>> On Tue, Apr 17, 2012 at 12:08 AM, Jamie Johnson <je...@gmail.com> wrote:
>>> I created to track this.  https://issues.apache.org/jira/browse/SOLR-3362
>>>
>>> On Mon, Apr 16, 2012 at 11:18 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>> doing some debugging this is the relevant block in FacetComponent
>>>>
>>>>          String name = shardCounts.getName(j);
>>>>          long count = ((Number)shardCounts.getVal(j)).longValue();
>>>>          ShardFacetCount sfc = dff.counts.get(name);
>>>>          sfc.count += count;
>>>>
>>>>
>>>> the issue is sfc is null.  I don't know if that should or should not
>>>> occur, but if I add a check (if(sfc == null)continue;) then I think it
>>>> would work.  Is this appropriate?
>>>>
>>>> On Mon, Apr 16, 2012 at 10:45 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>> worth noting....the error goes away at times depending on the number
>>>>> of facets asked for.
>>>>>
>>>>> On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>>> I found (what appears to be) the issue I am experiencing here
>>>>>> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
>>>>>> but there were no responses to it.  I've included the stack trace I am
>>>>>> seeing, any ideas why this would happen?
>>>>>>
>>>>>>
>>>>>> SEVERE: java.lang.NullPointerException
>>>>>>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>>>>>>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>>>>>>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>>>>>>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>>>>>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>>>>>>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>>>>>>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>>>>>>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>>>>>>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>>>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>>>>>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>>>>>>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>>>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>>>>>>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>>>>>>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>>>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>>>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>>>>>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>>>>>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>>>>>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>>>>>>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>>>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>>>>>>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>>>>>>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>>>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>>>>>>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>>>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>>>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>>>>>>        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Yonik Seeley <yo...@lucidimagination.com>.
facet.field={!terms=$organization__terms}organization

This is referring to another request parameter that Solr should have
added (organization__terms) .  Did you cut-n-paste all of the
parameters below?

-Yonik
lucenerevolution.com - Lucene/Solr Open Source Search Conference.
Boston May 7-10



On Tue, Apr 17, 2012 at 10:13 AM, Jamie Johnson <je...@gmail.com> wrote:
> I'm noticing that this issue seems to be occurring with facet fields
> which have some unexpected characters.  For instance the query that I
> see going across the wire is as follows
>
> facet=true&tie=0.1&ids=3F2504E0-4F89-11D3-9A0C-0305E82C3301&qf=%0a++++++++++author^0.5+type^0.5+content_mvtxt^10++subject_phonetic^1+subject_txt^20%0a+++++++&q.alt=*:*&distrib=false&Test+%0a%0a%0a%0a?+%0a%0a%0a%0aDaily+News,Test+Association,Toyota,U.S.,Washington+Post&rows=10&rows=10&NOW=1334670761188&shard.url=JamiesMac.local:8502/solr/shard5-core1/&fl=*,score&q=bob&facet.field={!terms%3D$organization__terms}organization&isShard=true
>
> Now there is an obvious issue here with our data having these \n
> characters in it which I will be fixing shortly (plan to use a set of
> Character replace filters to remove extra white space).  I am assuming
> that this is causing our issue, but would be nice if someone could
> confirm.
>
>
> On Tue, Apr 17, 2012 at 12:08 AM, Jamie Johnson <je...@gmail.com> wrote:
>> I created to track this.  https://issues.apache.org/jira/browse/SOLR-3362
>>
>> On Mon, Apr 16, 2012 at 11:18 PM, Jamie Johnson <je...@gmail.com> wrote:
>>> doing some debugging this is the relevant block in FacetComponent
>>>
>>>          String name = shardCounts.getName(j);
>>>          long count = ((Number)shardCounts.getVal(j)).longValue();
>>>          ShardFacetCount sfc = dff.counts.get(name);
>>>          sfc.count += count;
>>>
>>>
>>> the issue is sfc is null.  I don't know if that should or should not
>>> occur, but if I add a check (if(sfc == null)continue;) then I think it
>>> would work.  Is this appropriate?
>>>
>>> On Mon, Apr 16, 2012 at 10:45 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>> worth noting....the error goes away at times depending on the number
>>>> of facets asked for.
>>>>
>>>> On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>>> I found (what appears to be) the issue I am experiencing here
>>>>> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
>>>>> but there were no responses to it.  I've included the stack trace I am
>>>>> seeing, any ideas why this would happen?
>>>>>
>>>>>
>>>>> SEVERE: java.lang.NullPointerException
>>>>>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>>>>>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>>>>>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>>>>>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>>>>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>>>>>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>>>>>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>>>>>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>>>>>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>>>>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>>>>>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>>>>>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>>>>>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>>>>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>>>>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>>>>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>>>>>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>>>>>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>>>>>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>>>>>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>>>>>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>>>>>        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Jamie Johnson <je...@gmail.com>.
I'm noticing that this issue seems to be occurring with facet fields
which have some unexpected characters.  For instance the query that I
see going across the wire is as follows

facet=true&tie=0.1&ids=3F2504E0-4F89-11D3-9A0C-0305E82C3301&qf=%0a++++++++++author^0.5+type^0.5+content_mvtxt^10++subject_phonetic^1+subject_txt^20%0a+++++++&q.alt=*:*&distrib=false&Test+%0a%0a%0a%0a?+%0a%0a%0a%0aDaily+News,Test+Association,Toyota,U.S.,Washington+Post&rows=10&rows=10&NOW=1334670761188&shard.url=JamiesMac.local:8502/solr/shard5-core1/&fl=*,score&q=bob&facet.field={!terms%3D$organization__terms}organization&isShard=true

Now there is an obvious issue here with our data having these \n
characters in it which I will be fixing shortly (plan to use a set of
Character replace filters to remove extra white space).  I am assuming
that this is causing our issue, but would be nice if someone could
confirm.


On Tue, Apr 17, 2012 at 12:08 AM, Jamie Johnson <je...@gmail.com> wrote:
> I created to track this.  https://issues.apache.org/jira/browse/SOLR-3362
>
> On Mon, Apr 16, 2012 at 11:18 PM, Jamie Johnson <je...@gmail.com> wrote:
>> doing some debugging this is the relevant block in FacetComponent
>>
>>          String name = shardCounts.getName(j);
>>          long count = ((Number)shardCounts.getVal(j)).longValue();
>>          ShardFacetCount sfc = dff.counts.get(name);
>>          sfc.count += count;
>>
>>
>> the issue is sfc is null.  I don't know if that should or should not
>> occur, but if I add a check (if(sfc == null)continue;) then I think it
>> would work.  Is this appropriate?
>>
>> On Mon, Apr 16, 2012 at 10:45 PM, Jamie Johnson <je...@gmail.com> wrote:
>>> worth noting....the error goes away at times depending on the number
>>> of facets asked for.
>>>
>>> On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
>>>> I found (what appears to be) the issue I am experiencing here
>>>> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
>>>> but there were no responses to it.  I've included the stack trace I am
>>>> seeing, any ideas why this would happen?
>>>>
>>>>
>>>> SEVERE: java.lang.NullPointerException
>>>>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>>>>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>>>>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>>>>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>>>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>>>>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>>>>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>>>>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>>>>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>>>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>>>>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>>>>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>>>>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>>>>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>>>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>>>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>>>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>>>>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>>>>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>>>>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>>>>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>>>>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>>>>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>>>>        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Jamie Johnson <je...@gmail.com>.
I created to track this.  https://issues.apache.org/jira/browse/SOLR-3362

On Mon, Apr 16, 2012 at 11:18 PM, Jamie Johnson <je...@gmail.com> wrote:
> doing some debugging this is the relevant block in FacetComponent
>
>          String name = shardCounts.getName(j);
>          long count = ((Number)shardCounts.getVal(j)).longValue();
>          ShardFacetCount sfc = dff.counts.get(name);
>          sfc.count += count;
>
>
> the issue is sfc is null.  I don't know if that should or should not
> occur, but if I add a check (if(sfc == null)continue;) then I think it
> would work.  Is this appropriate?
>
> On Mon, Apr 16, 2012 at 10:45 PM, Jamie Johnson <je...@gmail.com> wrote:
>> worth noting....the error goes away at times depending on the number
>> of facets asked for.
>>
>> On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
>>> I found (what appears to be) the issue I am experiencing here
>>> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
>>> but there were no responses to it.  I've included the stack trace I am
>>> seeing, any ideas why this would happen?
>>>
>>>
>>> SEVERE: java.lang.NullPointerException
>>>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>>>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>>>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>>>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>>>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>>>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>>>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>>>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>>>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>>>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>>>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>>>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>>>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>>>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>>>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>>>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>>>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>>>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>>>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>>>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>>>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>>>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>>>        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Jamie Johnson <je...@gmail.com>.
doing some debugging this is the relevant block in FacetComponent

          String name = shardCounts.getName(j);
          long count = ((Number)shardCounts.getVal(j)).longValue();
          ShardFacetCount sfc = dff.counts.get(name);
          sfc.count += count;


the issue is sfc is null.  I don't know if that should or should not
occur, but if I add a check (if(sfc == null)continue;) then I think it
would work.  Is this appropriate?

On Mon, Apr 16, 2012 at 10:45 PM, Jamie Johnson <je...@gmail.com> wrote:
> worth noting....the error goes away at times depending on the number
> of facets asked for.
>
> On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
>> I found (what appears to be) the issue I am experiencing here
>> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
>> but there were no responses to it.  I've included the stack trace I am
>> seeing, any ideas why this would happen?
>>
>>
>> SEVERE: java.lang.NullPointerException
>>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>>        at java.lang.Thread.run(Thread.java:662)

Re: Distributed FacetComponent NullPointer Exception

Posted by Jamie Johnson <je...@gmail.com>.
worth noting....the error goes away at times depending on the number
of facets asked for.

On Mon, Apr 16, 2012 at 10:38 PM, Jamie Johnson <je...@gmail.com> wrote:
> I found (what appears to be) the issue I am experiencing here
> http://lucene.472066.n3.nabble.com/NullPointerException-with-distributed-facets-td3528165.html
> but there were no responses to it.  I've included the stack trace I am
> seeing, any ideas why this would happen?
>
>
> SEVERE: java.lang.NullPointerException
>        at org.apache.solr.handler.component.FacetComponent.refineFacets(FacetComponent.java:489)
>        at org.apache.solr.handler.component.FacetComponent.handleResponses(FacetComponent.java:278)
>        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
>        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1550)
>        at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:442)
>        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:263)
>        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
>        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
>        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
>        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
>        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
>        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
>        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
>        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>        at org.eclipse.jetty.server.Server.handle(Server.java:351)
>        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
>        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
>        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
>        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
>        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
>        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
>        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
>        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
>        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
>        at java.lang.Thread.run(Thread.java:662)