lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <>
Subject [jira] [Commented] (SOLR-4614) ClusterState#getSlices returns null causing NPE in ClientUtils#addSlices
Date Tue, 19 Mar 2013 16:35:16 GMT


Mark Miller commented on SOLR-4614:

Perhaps a NullPointer is right? Or illegal argument exception? I have not looked into what
that affects, but I think I hit this same thing and went with a fix higher up of:

        if (colSlices == null) {
          throw new SolrServerException("Could not find collection:" + collectionName);

I guess it depends on what adding slices to a null slice means - my first thought was that
it was an error.
> ClusterState#getSlices returns null causing NPE in ClientUtils#addSlices
> ------------------------------------------------------------------------
>                 Key: SOLR-4614
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java, SolrCloud
>    Affects Versions: 4.1
>            Reporter: David Arthur
>            Priority: Minor
> When my program sends an UpdateRequest to a collection that has been deleted, I am getting
> {code}
> java.lang.NullPointerException
>     at org.apache.solr.client.solrj.util.ClientUtils.addSlices(
>     at org.apache.solr.client.solrj.impl.CloudSolrServer.request(
>     at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(
> {code}
> This appears to be caused by the fact that ClusterState#getSlices is returning null instead
of an empty collection.
> ClusterState returning null:
> ClientUtil#addSlices iterating over a null:
> I would attach a patch, but I'm not sure what the preferred style is within the project
(empty collection vs null checks).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message