Which jars are needed to use ConcurrentUpdateSolrServer?

不问归期 提交于 2019-12-11 01:35:13

问题


Currently using

solrServer = new CommonsHttpSolrServer(serverUrl);

and with these jars..

apache-solr-core-3.6.0
apache-solr-solrj-3.6.0
commons-codec-1.6
commons-httpclient-3.1
commons-io-2.1
jcl-over-slf4j-1.6.1
slf4j-api-1.6.1
slf4j-jdk14-1.6.1
lucene-core-3.5.0

However apache solr deprecated CommonHttpSolrServer and suggested ConcurrentUpdateSolrServer
Replacing CommonHttpSolrServer by ConcurrentUpdateSolrServer gives runtime exception ..


Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpRequestInterceptor

which needs the jar httpcore-4.0-alpha6.jar
Exception also indicate three more exceptions.
Anybody having list of which extra jars like httpcore-4.0-alpha6.jar are needed to replace CommonHttpSolrServer by ConcurrentUpdateSolrServer


回答1:


Take a look at https://issues.apache.org/jira/browse/SOLR-3374 You need to include httpcore, httpmime and httpclient jars.

Also, I noticed that you are using Solr 3.6 jars with Lucene 3.5 jars - it is generally a good idea to keep Solr and Lucene jar versions in sync.



来源:https://stackoverflow.com/questions/10716690/which-jars-are-needed-to-use-concurrentupdatesolrserver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!