Description
When sending document updates to Solr, we occasionally see the following error:
java.lang.NullPointerException at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1182) at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1073) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:173) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:138) at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:152)
Looking at the code, there is a lack of null check on requestedCollections around the for loop
for (DocCollection ext : requestedCollections)
which causes the error. Wrapping this loop with if(requestedCollections != null) would solve the problem.
Attachments
Issue Links
- links to