Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2483

Using PackageParser in ForkParser causes NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.16
    • Fix Version/s: 1.17
    • Component/s: parser
    • Labels:
      None

      Description

      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)

      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()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chikei TzeKai Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: