Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4012

Sometimes the UPnP plugin fails to start due to device being removed from network

    XMLWordPrintableJSON

Details

    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)
      

      Attachments

        Activity

          People

            v_valchev Valentin Valchev
            v_valchev Valentin Valchev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: