Why can't I instantiate DataImportHandler in Solr on JBoss?

前端 未结 3 1588
Happy的楠姐
Happy的楠姐 2020-12-11 20:59

I\'m trying to set up Solr 3.5.0 on JBoss 5.1. Everything works quite fine. I copied war into deploy dir, all the dependencies from dist and contrib directories into the lib

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 21:11

    As said by Paige Cook this is a class loader issue, you should add dataimport jars into a path used by Solr class loader. In order to define such lib path there are many options. Old versions of Solr (4.x and older) accepts an attribute sharedLib in the tag :

    
    
    • sharedLib - Path to a directory containing .jar files that are added to the classpath of every core. The path is relative to solr.home (where solr.xml sits).

    Newer versions of Solr (5.x and newer) use sharedLib as a child node of solr element.

    
    
      lib
    
    

    Even in this case the lib path is relative to solr.home (where solr.xml sits).

    Another alternative is define a lib directive directly into the solrconfig.xml,

提交回复
热议问题