Description
I was trying to use the V2Request to invoke the Config API and ran into this bug. In my case, the command had name missing but it is a required attribute:
String addListenerCommand = "{'add-listener' : {'event':'newSearcher', 'class':'" + TestSolrEventListener.class.getName() + "'}}"; V2Request request = new V2Request.Builder("/c/warmingTestColl/config").withMethod(SolrRequest.METHOD.POST).withPayload(addListenerCommand).build(); request.process(solrClient);
The logs show that there was an exception:
4409 INFO (qtp480792233-31) [n:127.0.0.1:35920_solr c:warmingTestColl s:shard1 r:core_node1 x:warmingTestColl_shard1_replica_n1] o.a.s.h.SolrConfigHandler Failed to run commands. errors are {add-listener={event=newSearcher\, class=org.apache.solr.cloud.TestCloudSearcherWarming$TestSolrEventListener}\, errorMessages=['name' is a required field]}
But SolrJ, returned an NPE:
java.lang.NullPointerException at __randomizedtesting.SeedInfo.seed([312F78548DE0B0CB:B97B478E231CDD33]:0) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160) at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:177)