You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "g00glen00b (JIRA)" <ji...@apache.org> on 2015/03/10 08:01:40 UTC

[jira] [Created] (SOLR-7221) ConcurrentUpdateSolrServer does not work with HttpClientBuilder (4.3.1)

g00glen00b created SOLR-7221:
--------------------------------

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


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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org