[jira] [Commented] (TIKA-2483) Using PackageParser in ForkParser causes NPE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (TIKA-2483) Using PackageParser in ForkParser causes NPE

JIRA jira@apache.org

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

Hudson commented on TIKA-2483:
------------------------------

SUCCESS: Integrated in Jenkins build Tika-trunk #1391 (See [https://builds.apache.org/job/Tika-trunk/1391/])
TIKA-2483 -- revert loading of mime repository in PackageParser from (tallison: [https://github.com/apache/tika/commit/06486c8548daf5f9ba588da4e88e3da82a429e70])
* (edit) tika-parsers/src/main/java/org/apache/tika/parser/pkg/PackageParser.java
* (edit) tika-parsers/src/test/java/org/apache/tika/parser/fork/ForkParserIntegrationTest.java


> Using PackageParser in ForkParser causes NPE
> --------------------------------------------
>
>                 Key: TIKA-2483
>                 URL: https://issues.apache.org/jira/browse/TIKA-2483
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.16
>            Reporter: TzeKai Lee
>         Attachments: testForkedPackageParsing.patch
>
>
> {quote}
> Caused by: java.lang.NullPointerException
>         at org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:158)
>         at org.apache.tika.mime.MimeTypes.getDefaultMimeTypes(MimeTypes.java:577)
>         at org.apache.tika.config.TikaConfig.getDefaultMimeTypes(TikaConfig.java:78)
>         at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:242)
>         at org.apache.tika.config.TikaConfig.getDefaultConfig(TikaConfig.java:379)
>         at org.apache.tika.parser.pkg.PackageParser.parse(PackageParser.java:165)
>         at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> {quote}
> The mediaTypeRegistry handling code in parse() of PackageParser seems cause the problem due to ForkParser cannot properly construct default TikaConfig. Also since TikaConfig is not serializable, there is no way to assign mediaTypeRegistry/bufferedMediaTypeRegistry before calling parse()



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)