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 Max Lynch <ih...@gmail.com> on 2010/06/17 04:28:10 UTC

MailEntityProcessor class cast exception

With last night's build of solr, I am trying to use the MailEntityProcessor
to index an email account.  However, when I call my dataimport url, I
receive a class cast exception:

INFO: [] webapp=/solr path=/dataimport params={command=full-import} status=0
QTime=44
Jun 16, 2010 8:16:03 PM org.apache.solr.handler.dataimport.SolrWriter
readIndexerProperties
WARNING: Unable to read: dataimport.properties
Jun 16, 2010 8:16:03 PM org.apache.solr.update.DirectUpdateHandler2
deleteAll
INFO: [] REMOVING ALL DOCUMENTS FROM INDEX
Jun 16, 2010 8:16:03 PM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1

 commit{dir=/home/m/g/spider/misc/solrindex_nl/index,segFN=segments_1,version=1276738117525,generation=1,filenames=[segments_1]
Jun 16, 2010 8:16:03 PM org.apache.solr.core.SolrDeletionPolicy
updateCommits
INFO: newest commit = 1276738117525
Jun 16, 2010 8:16:03 PM org.apache.solr.handler.dataimport.DataImporter
doFullImport
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
load EntityProcessor implementation for entity:99544078513223 Processing
Document # 1
        at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
        at
org.apache.solr.handler.dataimport.DocBuilder.getEntityProcessor(DocBuilder.java:804)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:535)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:260)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:184)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:392)
        at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:373)
Caused by: java.lang.ClassCastException:
org.apache.solr.handler.dataimport.MailEntityProcessor cannot be cast to
org.apache.solr.handler.dataimport.EntityProcessor
        at
org.apache.solr.handler.dataimport.DocBuilder.getEntityProcessor(DocBuilder.java:801)
        ... 6 more
Jun 16, 2010 8:16:03 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Jun 16, 2010 8:16:03 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback

Here is my dataimport part of my solrconfig.xml:
  <requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
      <lst name="defaults">
          <str
name="config">/home/max/packages/apache-solr-4.0-2010-06-16_08-05-33/e/solr/conf/data-config.xml</str>
      </lst>
  </requestHandler>

and my data-config.xml:
<dataConfig>
<document>
   <entity processor="MailEntityProcessor"
           user="***"
           password="***"
           host="***"
           protocol="imaps"
           folders = "INBOX"/>
</document>
</dataConfig>

I did try to rebuild the solr nightly, but I still receive the same error.
 I have all of the required jar's (AFAIK) in my application's lib folder.

Any ideas?

Thanks.

Re: MailEntityProcessor class cast exception

Posted by Chris Hostetter <ho...@fucit.org>.
: org.apache.solr.handler.dataimport.MailEntityProcessor cannot be cast to
: org.apache.solr.handler.dataimport.EntityProcessor
	...
: I did try to rebuild the solr nightly, but I still receive the same error.
:  I have all of the required jar's (AFAIK) in my application's lib folder.
: 
: Any ideas?

My best guess is that you are loading different versions of differnet jars 
-- so that you have MailEntityProcessor from one version of solr and 
EntityProcessor from a differnet version of solr, so it can't use it.

double check all of the log messages from when you start up Solr, messages 
from the method "replaceClassLoader" will list every plugin jar it is 
loading: make sure all the jars listed are the ones you expect.

if that all checks out, then load the url 
http://localhost:8983/solr/admin/system and ensure that no solr related 
jars are listed in the classpath or bootclasspath.



-Hoss