2011-03-11 54 views
0

我正在使用tika和dataimporthandler。在執行完全導入時,我收到以下錯誤。solr tika提取問題

SEVERE: Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to load EntityProcessor implementation for entity:tika-test Processing Document # 1 
      at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72) 
      at org.apache.solr.handler.dataimport.DocBuilder.getEntityProcessor(DocBuilder.java:817) 
      at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:547) 
      at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:267) 
      at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:186) 
      at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:353) 
      at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:411) 
      at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:392) 
    Caused by: java.lang.ClassNotFoundException: Unable to load TikaEntityProcessor or org.apache.solr.handler.dataimport.TikaEntityProcessor 
      at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:1010) 
      at org.apache.solr.handler.dataimport.DocBuilder.getEntityProcessor(DocBuilder.java:814) 
      ... 6 more 
    Caused by: org.apache.solr.common.SolrException: Error loading class 'TikaEntityProcessor' 
      at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389) 
      at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:1000) 
      ... 7 more 
    Caused by: java.lang.ClassNotFoundException: TikaEntityProcessor 
      at java.net.URLClassLoader$1.run(URLClassLoader.java:217) 
      at java.security.AccessController.doPrivileged(Native Method) 
      at java.net.URLClassLoader.findClass(URLClassLoader.java:205) 
      at java.lang.ClassLoader.loadClass(ClassLoader.java:319) 
      at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:615) 
      at java.lang.ClassLoader.loadClass(ClassLoader.java:264) 
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) 
      at java.lang.Class.forName0(Native Method) 
      at java.lang.Class.forName(Class.java:264) 
      at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373) 

solrconfig.xml中我寫的配置參數,這樣

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

我哪裏錯了?你們能幫助我嗎?我正在尋找這個很長一段時間。

回答

1

您正在使用哪個Solr版本? Solr 1.4?
1.4後添加了TikaEntityProcessor:
http://www.mail-archive.com/[email protected]/msg35902.html

+0

我也在使用1.4.1和3.2。在這兩個版本中它都顯示相同的錯誤。ticka版本是8.0 – 2011-03-12 05:56:49

+0

org.apache.solr.handler.dataimport.TikaEntityProcessor應該位於** apache-solr-dataimporthandler - ** _version_ **。jar **中。如果你解壓(rar)jar,你能找到類TikaEntityProcessor嗎?也許你的v3.2安裝使用1.4.1版本的jar包? – 2011-03-12 16:00:48