You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2016/10/02 01:43:20 UTC

[jira] [Commented] (SOLR-2220) DIH: ClassCastException in MailEntityProcessor

    [ https://issues.apache.org/jira/browse/SOLR-2220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15539491#comment-15539491 ] 

Alexandre Rafalovitch commented on SOLR-2220:
---------------------------------------------

We are now multiple Java versions ahead, plus some DIH changes. However, mail component is not used much, so theoretically this may still be an issue.

Does this still happen with the latest Solr? 

> DIH: ClassCastException in MailEntityProcessor
> ----------------------------------------------
>
>                 Key: SOLR-2220
>                 URL: https://issues.apache.org/jira/browse/SOLR-2220
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4, 1.4.1
>            Reporter: Koji Sekiguchi
>
> I hit ClassCastException in MailEntityProcessor, but it ignored due to the following catch block:
> {code}
> private Map<String, Object> getDocumentFromMail(Message mail) {
>   Map<String, Object> row = new HashMap<String, Object>();
>   try {
>     addPartToDocument(mail, row, true);
>     return row;
>   } catch (Exception e) {
>     return null;
>   }
> }
> {code}
> The exception is "com.sun.mail.imap.IMAPInputStream cannot be cast to javax.mail.Multipart" in addPartToDocument() method:
> {code}
> if (part.isMimeType("multipart/*")) {
>   Multipart mp = (Multipart) part.getContent();
>     :
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org