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

When using Tika with OSGi, Bundle activator is not allowing override of InitializableProblemHandler.WARN

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.19.1
    • None
    • parser
    • None

    Description

      When using Tika with OSGi, I am not able to override this warning:
      ... org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem
      WARNING: org.xerial's sqlite-jdbc is not loaded.
      Please provide the jar on your classpath to parse sqlite files.
      See tika-parsers/pom.xml for the correct version.

      I don't need sqlite handling, and am really not sure why it is a required jar.  It should be optional.

      I have tried to override it with a tika.config system property, but the OSGi Activator does not use that configuration file.

      The OSGi Activator is following this path to the ServiceLoader constructor, where the level is hard coded to WARN.

          public ServiceLoader(

                  ClassLoader loader, LoadErrorHandler handler, boolean dynamic)

      {         *this*(loader, handler, InitializableProblemHandler.WARN, dynamic);     }

      This is the stack trace that it follows to this path:

      Please make a property where one can override the level similar to "org.apache.tika.service.error.warn" is available for the LoadErrorHandler.

      I recommend something like: 

      org.apache.tika.service.initializableProblemHandler.level = IGNORE, with a default value of WARN.

      Attachments

        1. image-2021-03-17-17-54-34-817.png
          185 kB
          Garry Watkins

        Activity

          People

            Unassigned Unassigned
            catshow Garry Watkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: