[ 
https://issues.apache.org/jira/browse/SOLR-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675635#action_12675635
 ] 

Arie Fishler commented on SOLR-1021:
------------------------------------

I'll start from scratch since it might be possible I generated some mess here :)

In FieldStatsInfo I got a NullPointerException in line 51 which indicated that 
the nl variable passed to the constructor is probaby null
FieldStatsInfo( NamedList<Object> nl, String fname )

Constructor is only called from QueryResponse.java and I added the if statement 
there to avoid the exception (and not call the constructor when this occurs. I 
did not get too deep into that but seems like there might be a situation when 
the stat info is null for some fields. 
I am not sure if this is the best solution or it might indicate another 
problem. This solution works for me. 
 

> NullPointerException in FieldStatsInfo
> --------------------------------------
>
>                 Key: SOLR-1021
>                 URL: https://issues.apache.org/jira/browse/SOLR-1021
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4
>         Environment: Tomcat 6, Windows
>            Reporter: Arie Fishler
>            Priority: Minor
>         Attachments: SolrResponse.java
>
>
> A NullPointerException is thrown at line 51 of class FieldStatsInfo since the 
> returned stats information for the fname (ctor variable) is null and not 
> checked for being so.
> Seems like this occurs when the search returns with no results but there were 
> some setGetFieldStatistics defined for some fields.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to