felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-674) Better error reporting when loading bundle classes
Date Fri, 08 Aug 2008 04:33:44 GMT
Better error reporting when loading bundle classes

                 Key: FELIX-674
                 URL: https://issues.apache.org/jira/browse/FELIX-674
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: felix-1.0.4
            Reporter: Don Brown

We (Atlassian) are in the middle of a rollout of our new plugin
framework that has Felix at its core.  The plugin system operates on
top of existing Java webapps as an embedded container, with plugins
exposing XML configuration defining what plugin extension points they
implement.  When the plugin is started, the web application needs to
resolve that class name to a class instance, which is currently
implemented using Bundle.loadClass().

However, the Bundle.loadClass() method is swallowing the root cause of
any exception causing the class to not be resolved, so if it is trying
to load FooPlugin, which fails due to a missing class dependency of
FooPlugin, Bundle.loadClass() throws a ClassNotFoundException that
says FooPlugin wasn't found, which is misleading.  I traced it down
(version 1.0.4) to ModuleImpl.getClass(), which swallows any
exceptions by only logging them as a warning.  Unfortunately, the warn
messages are given a lower priority by the host application due to a
number of warnings that happen as a natural part of the loading

This ticket asks for better error reporting ideally through proper chained exceptions.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message