You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/10/25 11:38:12 UTC

[jira] [Commented] (FELIX-3734) MetaType: NPE in ServiceTracker for fragment bundle

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

Felix Meschberger commented on FELIX-3734:
------------------------------------------

Thanks for reporting.

Looking at this a bit more in-depth, it looks like there are two issues lingering actually:

(1) The MetaTypeService.getMetaTypeInformation(Bundle) implementation should probably return null for fragments any way. Respective information provided by the fragment should be exposed through the host bundle to which the fragment binds.

(2) The MetaTypeProviderTracker should not use the MetaTypeInformation bundle's context to listen for services but the Meta Type Service implementation bundle context. Same as is done for the ServiceMetaTypeInformation listener for ManagedService[Factory] services.
                
> MetaType: NPE in ServiceTracker for fragment bundle
> ---------------------------------------------------
>
>                 Key: FELIX-3734
>                 URL: https://issues.apache.org/jira/browse/FELIX-3734
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>            Reporter: Jeremias Maerki
>            Assignee: Felix Meschberger
>         Attachments: felix-metatype-npe-fix-for-fragments.diff
>
>
> An NPE occurs when calling up the "Config" page of Felix WebConsole 4.0.0 when there are fragment bundles:
> 10:20:08,839|ERROR| qtp521679231-100 | ?                                   ? | 249 | %configMgr.pluginTitle: listFactoryConfigurations: Unexpected problem encountered
> java.lang.NullPointerException
>         at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:197)[org.apache.felix.framework-4.0.3.jar:]
>         at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:268)[org.apache.felix.framework-4.0.3.jar:]
>         at org.apache.felix.metatype.internal.MetaTypeProviderTracker.<init>(MetaTypeProviderTracker.java:36)
>         at org.apache.felix.metatype.internal.MetaTypeInformationImpl.<init>(MetaTypeInformationImpl.java:74)
>         at org.apache.felix.metatype.internal.ServiceMetaTypeInformation.<init>(ServiceMetaTypeInformation.java:79)
>         at org.apache.felix.metatype.internal.MetaTypeServiceImpl.getMetaTypeInformation(MetaTypeServiceImpl.java:130)
>         at org.apache.felix.webconsole.internal.compendium.ConfigManagerBase.getObjectClassDefinitions(ConfigManagerBase.java:121)[263:org.apache.felix.webconsole:4.0.0]
>         at org.apache.felix.webconsole.internal.compendium.ConfigManagerBase.getFactoryPidObjectClasses(ConfigManagerBase.java:95)[263:org.apache.felix.webconsole:4.0.0]
>         at org.apache.felix.webconsole.internal.compendium.ConfigManager.listFactoryConfigurations(ConfigManager.java:437)[263:org.apache.felix.webconsole:4.0.0]
>         at org.apache.felix.webconsole.internal.compendium.ConfigManager.renderContent(ConfigManager.java:375)[263:org.apache.felix.webconsole:4.0.0]
>         at org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:155)[263:org.apache.felix.webconsole:4.0.0]
>         at org.apache.felix.webconsole.internal.compendium.ConfigManager.doGet(ConfigManager.java:309)[263:org.apache.felix.webconsole:4.0.0]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[32:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira