tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Gauss II (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TIKA-1166) FLVParser NullPointerException
Date Wed, 28 Aug 2013 18:34:53 GMT

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

Ray Gauss II resolved TIKA-1166.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

I briefly tried a few methods of trimming the problem file's size but none reproduced the
issue in the resulting file.

Committed a check for null in r1518318.
                
> FLVParser NullPointerException
> ------------------------------
>
>                 Key: TIKA-1166
>                 URL: https://issues.apache.org/jira/browse/TIKA-1166
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.1, 1.2, 1.3, 1.4
>         Environment: All
>            Reporter: david rapin
>            Assignee: Ray Gauss II
>              Labels: easyfix
>             Fix For: 1.5
>
>         Attachments: data.mp4
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> On certain video files, the FLV parser throws an NPE on line 242.
> The piece of code causing this is the following:
> https://github.com/apache/tika/blob/1.4/tika-parsers/src/main/java/org/apache/tika/parser/video/FLVParser.java#L242
> {noformat}241: for (Entry<String, Object> entry : extractedMetadata.entrySet())
{
> 242:   metadata.set(entry.getKey(), entry.getValue().toString());
> 243: }
> {noformat} 
> Which should probably be replaced by something like this:
> {noformat}241: for (Entry<String, Object> entry : extractedMetadata.entrySet())
{
> 242:   if (entry.getValue() == null) continue;
> 243:   metadata.set(entry.getKey(), entry.getValue().toString());
> 244: }
> {noformat} 
> Exception trace :
> {noformat}[root@hermes backend]# java -jar bin/tika-app-1.1.jar -j ./data.mp4
> Exception in thread "main" org.apache.tika.exception.TikaException: Unexpected RuntimeException
from org.apache.tika.parser.video.FLVParser@58d9660d
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
>         at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
>         at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:130)
>         at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:397)
>         at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:101)
> Caused by: java.lang.NullPointerException
>         at org.apache.tika.parser.video.FLVParser.parse(FLVParser.java:242)
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
>         ... 5 more
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
>         at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:130)
>         at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:397)
>         at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:101)
> Caused by: java.lang.NullPointerException
>         at org.apache.tika.parser.video.FLVParser.parse(FLVParser.java:242)
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
>         ... 5 more
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message