You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Valentin Valchev (JIRA)" <ji...@apache.org> on 2014/07/22 09:19:38 UTC

[jira] [Resolved] (FELIX-4572) Web Console may cause NPE on refresh packages

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

Valentin Valchev resolved FELIX-4572.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: webconsole-4.2.4
         Assignee: Valentin Valchev

fixed in rev. 1612488

> Web Console may cause NPE on refresh packages
> ---------------------------------------------
>
>                 Key: FELIX-4572
>                 URL: https://issues.apache.org/jira/browse/FELIX-4572
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.2.2
>            Reporter: Valentin Valchev
>            Assignee: Valentin Valchev
>            Priority: Trivial
>             Fix For: webconsole-4.2.4
>
>
> If you try to refresh packages on the webconsole or it's dependencies (like the fileupload) bundle, the following exception will be printed in the log file:
> {code}
>  [ERROR]8 : [HTTP] Problem while making answer to request /system/console/bundles/19 from client address 127.0.0.1:63063
> java.lang.NullPointerException
>         at org.osgi.util.tracker.ServiceTracker.<init>(ServiceTracker.java:207)
>         at org.apache.felix.webconsole.SimpleWebConsolePlugin.getService(SimpleWebConsolePlugin.java:196)
>         at org.apache.felix.webconsole.internal.core.BundlesServlet.getPackageAdmin(BundlesServlet.java:1403)
>         at org.apache.felix.webconsole.internal.core.BundlesServlet.isFragmentBundle(BundlesServlet.java:715)
>         at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:358)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:815)
>         at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:493)
>         at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:418)
> {code}
> The reason is that the refresh will cause the webconsole bundle to be restarted. Here is what happens:
> # doPost entered
> # sent package refresh
> # webconsole bundle is stopped
> # web console tries to access a service
> # NPE
> # doPost leaving
> To prevent that, the bundle plugin should simply check if the bundleContext is null



--
This message was sent by Atlassian JIRA
(v6.2#6252)