Error when start Solr cloud, due to location of 3rd party libraries

后端 未结 5 1243
广开言路
广开言路 2021-02-06 15:22

I tried to migrate to Solr 3.1 , my project uses Dataimport handler , when I started solr it asked me SolrCoreAwar not found I copied the following file to lib directory apache-

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-06 15:46

    The problem is now solved.

    This problem occurred because dataimporthandler and requesthandler are loaded by two different class loaders. To solve it, ensure that solr loads its jars only from the same class loader.

    First of all I ensured that :

    1) In solrconfig.xml remove ensure that dataimporthandler only comes from one place 2) I have commented all directives and added new one that refers to lib directory in solr directory so the lib directory path is example/solr/lib , this directory doesn't exists by default. Create it (for example using mkdir solr/lib) and the lib directive in solrconfig.xml becomes

       
    

    3) Add the jar file from dist directory to this directory example/solr/lib
    4) Fire up your solr server

    And don't forget to copy your mysql-driver jar to your include path to be able to index your mysql database tables if you use dataimporthandler for this purpose

    Note: This works for solr 4.0

提交回复
热议问题