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

Ishan Chattopadhyaya commented on SOLR-7221:
--------------------------------------------

bq. Is there a related ticket to migrate HttpSolrServer to the new httpclient 
4.3 api?
HttpClient has already been upgraded to 4.4.1. But, it still uses deprecated 
stuff, and not the HttpClientBuilder interface. Here's the related issue: 
SOLR-5604.

> ConcurrentUpdateSolrServer does not work with HttpClientBuilder (4.3.1)
> -----------------------------------------------------------------------
>
>                 Key: SOLR-7221
>                 URL: https://issues.apache.org/jira/browse/SOLR-7221
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 4.9
>            Reporter: g00glen00b
>              Labels: httpclient, solrj
>
> I recently found out about the {{ConcurrentUpdateSolrServer}} and I'm trying 
> to switch from the {{HttpSolrServer}} for batch processing.
> However, our Solr is protected with basic authentication, so we're using a 
> custom {{HttpClient}} that sends the credentials with it.
> This works fine with {{HttpSolrServer}}, but not with 
> {{ConcurrentUpdateSolrServer}}.  The {{ConcurrentUpdateSolrServer}} uses 
> {{this.server.setFollowRedirects(false)}}, but this triggers {{getParams()}} 
> on the {{HttpClient}} which throws an `UnSupportedOperationException` when 
> you use the {{InternalHttpClient}} which is the default type when using the 
> {{HttpClientBuilder}}.
> The stack trace produced is:
>  {code}
> Caused by: java.lang.UnsupportedOperationException
>       at 
> org.apache.http.impl.client.InternalHttpClient.getParams(InternalHttpClient.java:206)
>       at 
> org.apache.solr.client.solrj.impl.HttpClientUtil.setFollowRedirects(HttpClientUtil.java:267)
>       at 
> org.apache.solr.client.solrj.impl.HttpSolrServer.setFollowRedirects(HttpSolrServer.java:658)
>       at 
> org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:124)
>       at 
> org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:115)
>       at 
> org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:105)
> {code}
> It's annoying of course, and I don't know who is to be "blamed". I reported 
> it here anyways because the {{getParams()}} method is deprecated.
> I'm using SolrJ 4.9, but I also noticed that it's neither working on 4.7 or 
> 4.8 or any version using HttpClient 4.3.



--
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