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 2013/03/04 09:05:12 UTC

[jira] [Resolved] (FELIX-3946) NullPointerException in BundleServlet.bundleDetails when not called through HTTP

     [ https://issues.apache.org/jira/browse/FELIX-3946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved FELIX-3946.
--------------------------------------

    Resolution: Fixed

Fixed as indicated in the initial description in Rev. 1452202:

In addition the "nfo" information generated by the BundleInfoProvider services is now also properly rendered in the printConfiguration output: For each block of BundleInfo objects the block key is printed as well as the BundleInfo.name fields. For example the services used by a bundle are printed like this:

>    Used Services: 
>        Service #1 of type(s) [org.osgi.service.packageadmin.PackageAdmin]
>        Service #45 of type(s) [org.apache.felix.webconsole.bundleinfo.BundleInfoProvider]
>        Service #41 of type(s) [org.osgi.service.http.HttpService, org.apache.felix.http.api.ExtHttpService]
>        Service #2 of type(s) [org.osgi.service.startlevel.StartLevel]

                
> NullPointerException in BundleServlet.bundleDetails when not called through HTTP
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-3946
>                 URL: https://issues.apache.org/jira/browse/FELIX-3946
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.0.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: webconsole-4.0.2
>
>
> With the introduction of the Inventory bundle and the migration of ConfigurationStatusPrinter to InventoryPrinter, these services may be called through other channels than through the Web Console over HTTP.
> Thus the appRoot and pluginRoot parameters to the BundleServlet.writeJSON method may be null and therefore the following code in the bundleDetails method throws a NullPointerException:
> > bundleInfoDetails(jw, bundle, pluginRoot.substring(0, pluginRoot.lastIndexOf("/")), locale);
> A number of fixes are required:
> * Prevent NPE at this code location
> * Clarify BundleInfoProvider interface that webConsoleRoot may be null
> * Fix ServicesUsedInfoProvider to create VALUE type BundleInfo if webConsoleRoot is null

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