You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dominique Bejean <do...@eolya.fr> on 2014/12/23 22:04:31 UTC

Re: Solr Cloud and relative paths in solrconfig.xml lib directives

Hi,

I use to put all dependency jar files (dih, adbc driver, …) in a lib
directory in the solr home directory where your shard are created.

something like this

solr/
    solr.xml
    cloudcollection1_shard2_replica2/
    lib/


In solrconfig.xml, I remove all the <lib …> directives except this one <lib
 dir="../lib" />
You may need to restart your nodes after creating your lib directory

Regards

Dominique

2014-12-23 21:25 GMT+01:00 Jens Ivar Jørdre <ji...@gmail.com>:

> Hi all,
>
> I seek some advice on the use of lib directives in solrconfig.xml in Solr
> Cloud. My project has been tested with Solr 4.10.2 and run nicely on single
> node with the included Jetty. The setup adds a DataImportHandler request
> handler to solrconfig.xml. It also adds a lib directive to solconfig.xml to
> pick up dataimporhandler jars from «../../../dist».
>
> Now, in migrating this setup to Solr Cloud I upconfig the configuration to
> ZooKeeper and create collection with the collections API’s CREATE action.
> The problem with this approach is that the relative path to dist in the lib
> directive does not resolve correctly.
>
> failure: {
> :
> "org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error
> CREATEing SolrCore 'cloudcollection1_shard2_replica2': Unable to create
> core [cloudcollection1_shard2_replica2] Caused by:
> org.apache.solr.handler.dataimport.DataImportHandler"
> }
>
> and the logs reveal that class
> org.apache.solr.handler.dataimport.DataImportHandler is yet to be found.
> Then, revamping my lib directive with absolute path to dist directory that
> includes the dataimporthandler jars, another upconfig and collection
> creation anew successfully creates the collection.
>
> Is this intentional behavior forcing the use of absolute paths, or is it
> possible to use relative path to dist and contrib directories on
> solrconfig.xml in Cloud mode?
>
> --
> Sincerely,
> Jens Ivar Jørdre
> about.me/jijordre <http://about.me/jijordre>
>