Valentin Valchev created FELIX-4012:
---------------------------------------

             Summary: Sometimes the UPnP plugin fails to start due to device 
being removed from network
                 Key: FELIX-4012
                 URL: https://issues.apache.org/jira/browse/FELIX-4012
             Project: Felix
          Issue Type: Bug
          Components: Web Console
    Affects Versions: webconsole-upnp-plugin-1.0.2
            Reporter: Valentin Valchev
            Assignee: Valentin Valchev
             Fix For: webconsole-upnp-plugin-1.0.4


Since OSGi r4.3 it he methdod UPnPDevice.getIcons() may throw 
IllegalStateException if you keep reference to device that has been removed 
from the network.

During startup the ServiceTracker will notify the plugin for all previously 
registered UPnP devices. While processing them, a device can be removed and the 
reference becomes obsolete. Then the getIcons() method will throw exception 
which is not caught and will cause the BundleActivator.start() to fail. So the 
bundle stays in resolved state.

Here is stack trace of the problem:
<code>
java.lang.IllegalStateException: The UPnP Device was removed from the network. 
Device UDN: uuid:e516cbe4-35fd-4cf9-a862-886969e13050
        at 
com.prosyst.mbs.impl.services.upnp.cp.api.UPnPDeviceImpl.checkState(UPnPDeviceImpl.java:477)
        at 
com.prosyst.mbs.impl.services.upnp.cp.api.UPnPDeviceImpl.getIcons(UPnPDeviceImpl.java:316)
        at 
org.apache.felix.webconsole.plugins.upnp.internal.ControlServlet.addingService(ControlServlet.java:543)
        at 
org.apache.felix.webconsole.plugins.upnp.internal.Activator.addingService(Activator.java:88)
        at 
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:909)
        at 
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
        at 
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:349)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:283)
        at 
org.apache.felix.webconsole.plugins.upnp.internal.Activator.start(Activator.java:48)
</code>

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

Reply via email to