Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
webconsole-upnp-plugin-1.0.2
-
None
Description
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:
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)