On 5/2/2013 1:43 PM, Alexandre Rafalovitch wrote:
> Actually, I found it very hard to figure out the exact Jar
> requirements for SolrJ. I ended up basically pointing at expanded
> webapp's lib directory, which is a total overkill.
> 
> Would be nice to have some specific guidance on this issue.

I have a SolrJ app that uses HttpSolrServer.  Here is the list of jars
in my lib directory relevant to SolrJ.  There are other jars related to
the other functionality in my app that I didn't list here.  I take a
very minimalistic approach for what I add to my lib directory.  I work
out the minimum jars required to get it to compile, then I try the
program out and determine which additional jars it needs one by one.

commons-io-2.4.jar
httpclient-4.2.4.jar
httpcore-4.2.4.jar
httpmime-4.2.4.jar
jcl-over-slf4j-1.7.5.jar
log4j-1.2.17.jar
slf4j-api-1.7.5.jar
slf4j-log4j12-1.7.5.jar
solr-solrj-4.2.1.jar

You might notice that my component versions are newer than what is
included in dist/solrj-lib.  I have tested all of the functionality of
my application, and I do not require the other jars found in
dist/solrj-lib, including zookeeper.  When I add functionality in the
future, if I run into a class not found exception, I will add the
appropriate jar.

If I were using CloudSolrServer, zookeeper would be required.  With
EmbeddedSolrServer, more Lucene and Solr jars are required, because that
starts the Solr server itself within your application.

Thanks,
Shawn

Reply via email to