Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D0C58200B8C for ; Mon, 12 Sep 2016 23:15:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CF35B160AB2; Mon, 12 Sep 2016 21:15:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2399D160AC8 for ; Mon, 12 Sep 2016 23:15:21 +0200 (CEST) Received: (qmail 77360 invoked by uid 500); 12 Sep 2016 21:15:20 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 77307 invoked by uid 99); 12 Sep 2016 21:15:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2016 21:15:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9943D2C1B7B for ; Mon, 12 Sep 2016 21:15:20 +0000 (UTC) Date: Mon, 12 Sep 2016 21:15:20 +0000 (UTC) From: "Will McGinnis (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-9497) HttpSolrClient.Builder Returns Unusable Connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 12 Sep 2016 21:15:23 -0000 [ https://issues.apache.org/jira/browse/SOLR-9497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15485312#comment-15485312 ] Will McGinnis commented on SOLR-9497: ------------------------------------- private static HttpSolrClient connectSolrClient() { return new HttpSolrClient.Builder(urlString).build(); } < dependency > < groupId > org.apache.solr < artifactId > solr - solrj < version > 6.2.0 < dependency > < groupId > org.apache.solr < artifactId > solr -core < version > 6.2.0 I also tried this: < dependency > < groupId > org.apache.httpcomponents < artifactId > httpclient < version > 4.5.2 What else do you need? Thank you Will McGinnis > HttpSolrClient.Builder Returns Unusable Connection > -------------------------------------------------- > > Key: SOLR-9497 > URL: https://issues.apache.org/jira/browse/SOLR-9497 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: clients - java > Affects Versions: 6.2 > Environment: Java 1.8 Mac OSX > Reporter: Will McGinnis > Labels: SolrJ > Fix For: 6.1.1 > > > SolrClient solr = new HttpSolrClient.Builder(urlString).build(); > Exception in thread "main" java.lang.VerifyError: Bad return type > Exception Details: > Location: > org/apache/solr/client/solrj/impl/HttpClientUtil.createClient(Lorg/apache/solr/common/params/SolrParams;Lorg/apache/http/conn/ClientConnectionManager;)Lorg/apache/http/impl/client/CloseableHttpClient; @58: areturn > Reason: > Type 'org/apache/http/impl/client/DefaultHttpClient' (current frame, stack[0]) is not assignable to 'org/apache/http/impl/client/CloseableHttpClient' (from method signature) > Current Frame: > bci: @58 > flags: { } > locals: { 'org/apache/solr/common/params/SolrParams', 'org/apache/http/conn/ClientConnectionManager', 'org/apache/solr/common/params/ModifiableSolrParams', 'org/apache/http/impl/client/DefaultHttpClient' } > stack: { 'org/apache/http/impl/client/DefaultHttpClient' } > Bytecode: > 0x0000000: bb00 0359 2ab7 0004 4db2 0005 b900 0601 > 0x0000010: 0099 001e b200 05bb 0007 59b7 0008 1209 > 0x0000020: b600 0a2c b600 0bb6 000c b900 0d02 002b > 0x0000030: b800 104e 2d2c b800 0f2d b0 > Stackmap Table: > append_frame(@47,Object[#143]) > at org.apache.solr.client.solrj.impl.HttpSolrClient.(HttpSolrClient.java:209) > at org.apache.solr.client.solrj.impl.HttpSolrClient$Builder.build(HttpSolrClient.java:874) > I have tried upgrading to httpclient-4.5.2. This appears to create the same problem. For now, I use this deprecated, connection code. > return new HttpSolrClient(urlString, new SystemDefaultHttpClient()); > Eventually, this hangs the Solr server, because you run out of file handles. > I suspect calling solrClient.close() is doing nothing. > I tried not closing and using a static connection to Solr. > This results in basically, the same problem of, eventually hanging the Solr server. -- 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