You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/12/06 12:44:00 UTC

[jira] [Created] (SLING-12183) Avoid exception on startup if Apache Tika is not available

Carsten Ziegeler created SLING-12183:
----------------------------------------

             Summary: Avoid exception on startup if Apache Tika is not available
                 Key: SLING-12183
                 URL: https://issues.apache.org/jira/browse/SLING-12183
             Project: Sling
          Issue Type: Improvement
          Components: Commons
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: Commons MIME 2.2.6


If Apache Tika is not available, a long exception stacktrace is logged as the DS component can't be instantiated. This is due to the fact that the component is lazy (which is good) and therefore DS registers a ServiceFactory for it. The ServiceFactory eventually returns null which then must be logged by the framework. Therefore there is nothing we can do in DS to prevent this logging.
As this is a simple component with zero references, zero configuration, it is much better to register it via a BundleActivator if Tika is available



--
This message was sent by Atlassian Jira
(v8.20.10#820010)