[ 
https://issues.apache.org/jira/browse/TIKA-678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Burch resolved TIKA-678.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

In r1147161 I've added a unit test for this case, based on your supplied test 
file. The test passes, so it looks like this issue has already been fixed by 
some other changes

> Unexpected RuntimeException from org.apache.tika.parser.mail.RFC822Parser
> -------------------------------------------------------------------------
>
>                 Key: TIKA-678
>                 URL: https://issues.apache.org/jira/browse/TIKA-678
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9
>         Environment: java 64bit ubuntu 11.04
>            Reporter: Izaak Alpert
>             Fix For: 1.0
>
>         Attachments: test.txt
>
>
> I get this exception from the tika-app with the command line:
> java -jar tika-app-0.9.jar -t test.txt 
> Exception in thread "main" org.apache.tika.exception.TikaException: 
> Unexpected RuntimeException from 
> org.apache.tika.parser.mail.RFC822Parser@558041e0
>       at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:199)
>       at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:197)
>       at 
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:135)
>       at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:107)
>       at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:302)
>       at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:91)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.tika.parser.mail.MailContentHandler.field(MailContentHandler.java:130)
>       at 
> org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:121)
>       at org.apache.tika.parser.mail.RFC822Parser.parse(RFC822Parser.java:60)
>       at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:197)
>       ... 5 more
> It seems that what is really just a text file is identified as mail. I guess 
> i'd expect this would fall back to a text parser if the mail processor can't 
> handle it (the CC: can be optionally there).
> The content of test.txt (i'll attach it as well)
> cat test.txt 
> From: xyz, abc
> Sent: Monday, May 03, 2010 4:21 PM
> To: abc, def
> Cc: eft,hij; [email protected]
> Subject: abcd
> foo:
> bar biz bat

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to