Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception:Can't find class SolrCoreAware

Tags:

solr

When I added this configuration in solrconfig.xml :

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">data-config.xml</str>
    </lst>
</requestHandler>

then started tomcat, I got this exception :

ClassNotFoundException: org.apache.solr.util.plugin.SolrCoreAware 

I checked the dir

<lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />

jar imported, what's wrong with it? what's the lib node dir attribute mean ?

like image 793
Sally Lou Avatar asked Aug 05 '12 16:08

Sally Lou


1 Answers

Converting OP's comment into an answer as (a) it's easier to spot and (b) worked for me:

Take care not to place solr-dataimporthandler-x.y.z.jar into

Tomcat\lib                                <-  Doesn't work!

Instead make sure it's placed in:

Tomcat\webapps\solr\WEB-INF\lib           <-  Works.
like image 135
Jeroen Avatar answered Oct 20 '22 00:10

Jeroen