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

Shawn Heisey commented on SOLR-8042:
------------------------------------

Here's the user's code from the mailing list:

{code}
    CollectionAdminRequest.Reload reloadReq = new 
CollectionAdminRequest.Reload();
    reloadReq.process(client, collection);
{code}

The process method that the user code is calling is on the request object.  
This ends up as SolrRequest#process ... which uses the request method on the 
client object.  The CloudSolrClient#request method appears to be where the 
disconnect starts, and I think the root of the problem is that the 
implementation of the request (likely in CollectionSpecificAdminRequest) does 
not have a facility for setting the collection, except with a "name" parameter.

Side issue:  The definition of ADMIN_PATHS looks like it is misplaced in 
CloudSolrClient.  It should be near the top of the class, with the other fields.


> SolrJ CollectionAdminRequest.Reload fails
> -----------------------------------------
>
>                 Key: SOLR-8042
>                 URL: https://issues.apache.org/jira/browse/SOLR-8042
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 5.3
>            Reporter: Hendrik Haddorp
>            Priority: Minor
>
> The following code fails stating that the collection name must be set:
> CollectionAdminRequest.Reload reloadReq = new CollectionAdminRequest.Reload();
> reloadReq.process(client, collection);
> call stack is:
> Caused by: 
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error 
> from server at http://xxx.xxx.xxx.xxx:10001/solr: Missing required parameter: 
> name
>     at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:560)
>     at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:234)
>     at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:226)
>     at 
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:376)
>     at 
> org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:328)
>     at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(CloudSolrClient.java:1085)
>     at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:856)
>     at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:799)
>     at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135)
> This can be prevented by adding
> reloadReq.setCollectionName(collection);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to