Re: Exception while creating a HttpSolrClinet

2016-12-15 Thread Shawn Heisey
On 12/15/2016 10:32 AM, tesm...@gmail.com wrote:
> I am getting the following exception while creating a Solr client. Any help
> is appreciated
>
> =This is code snipper to create a SolrClient===
>
> public void populate (String args) throws IOException, SolrServerException
>  {
>   String urlString =  "http://localhost:8983/solr;;
>SolrClient  server = new HttpSolrClient.Builder(urlString).build();
> ..
> ..
> ===

> Type 'org/apache/http/impl/client/SystemDefaultHttpClient' (current
> frame, stack[0]) is not assignable to
> 'org/apache/http/impl/client/CloseableHttpClient' (from method signature)

What's likely happening here is that you've got a problem with the
httpcomponents jars (httpclient, httpcore, httpmime) -- these are
dependencies of SolrJ.  Either you've got an incorrect version of one or
more of these jars, or you've got more than one version of them on your
classpath.

In general, a 4.5.x version of httpclient should work with most recent
versions of SolrJ.  Running with httpcomponents older than 4.3.0 could
be problematic.

Thanks,
Shawn



Exception while creating a HttpSolrClinet

2016-12-15 Thread tesm...@gmail.com
Hi,

I am getting the following exception while creating a Solr client. Any help
is appreciated

=This is code snipper to create a SolrClient===

public void populate (String args) throws IOException, SolrServerException
 {
  String urlString =  "http://localhost:8983/solr;;
   SolrClient  server = 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/impl/client/CloseableHttpClient;
@57: areturn
  Reason:
Type 'org/apache/http/impl/client/SystemDefaultHttpClient' (current
frame, stack[0]) is not assignable to
'org/apache/http/impl/client/CloseableHttpClient' (from method signature)
  Current Frame:
bci: @57
flags: { }
locals: { 'org/apache/solr/common/params/SolrParams',
'org/apache/solr/common/params/ModifiableSolrParams',
'org/apache/http/impl/client/SystemDefaultHttpClient' }
stack: { 'org/apache/http/impl/client/SystemDefaultHttpClient' }
  Bytecode:
0x000: bb00 0359 2ab7 0004 4cb2 0005 b900 0601
0x010: 0099 001e b200 05bb 0007 59b7 0008 1209
0x020: b600 0a2b b600 0bb6 000c b900 0d02 00b8
0x030: 000e 4d2c 2bb8 000f 2cb0
  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)
at PDFParseExtract.populate(PDFParseExtract.java:60)
at PDFParseExtract.main(PDFParseExtract.java:53)