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

NPE in Candidates.remove() method.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • resolver-1.10.0
    • None
    • Resolver
    • None

    Description

      Hi;

      I'm using framework 5.6.1 (which uses resolver 1.10.0).

      We are refactoring an old application which have problems, and while debugging (with felix.log.level=4), I got the following null pointer in the Candidates.remove method:

      Here is the NPE (I don't see the NPE with felix.log.level=1)

      java.lang.NullPointerException
      	at org.apache.felix.resolver.Candidates.remove(Candidates.java:1122)
      	at org.apache.felix.resolver.Candidates.remove(Candidates.java:1070)
      	at org.apache.felix.resolver.Candidates.populate(Candidates.java:244)
      	at org.apache.felix.resolver.Candidates.populateDynamic(Candidates.java:475)
      	at org.apache.felix.resolver.ResolverImpl.getInitialCandidates(ResolverImpl.java:470)
      	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:387)
      	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:649)
      	at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:620)
      	at org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1652)
      	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1552)
      	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
      	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:264)
      	at org.apache.log4j.helpers.Loader.loadClass(Loader.java:179)
      	at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:237)
      	at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:171)
      	at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:184)
      	at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:502)
      	at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:415)
      	at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:919)
      	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:790)
      	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:696)
      	at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
      	at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
      	at org.apache.log4j.Logger.getLogger(Logger.java:118)
      	at com.alcatel.as.service.metering2.SimpleMonitorable.<clinit>(SimpleMonitorable.java:20)
      	at alcatel.tess.hometop.gateways.osgi.Activator.init(Activator.java:41)
      	at org.apache.felix.dm.DependencyActivatorBase.start(DependencyActivatorBase.java:75)
      	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl$DeployedBundle.start(BundleInstallerImpl.java:1056)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.startBundles(BundleInstallerImpl.java:728)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.finishInitialisation(BundleInstallerImpl.java:230)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.frameworkEvent(BundleInstallerImpl.java:213)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.start(BundleInstallerImpl.java:174)
      	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
      	at org.apache.felix.framework.Felix.updateBundle(Felix.java:2484)
      	at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018)
      	at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1004)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.checkSelfUpdate(BundleInstallerImpl.java:273)
      	at com.alcatel.as.service.bundleinstaller.impl.BundleInstallerImpl.frameworkEvent(BundleInstallerImpl.java:192)
      	at org.apache.felix.framework.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:881)
      	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:830)
      	at org.apache.felix.framework.EventDispatcher.run(EventDispatcher.java:1147)
      	at org.apache.felix.framework.EventDispatcher.access$000(EventDispatcher.java:54)
      	at org.apache.felix.framework.EventDispatcher$1.run(EventDispatcher.java:102)
      	at java.lang.Thread.run(Thread.java:745)
      

      I don't know if the NPE above has already been fixed, maybe in FELIX-5389 ? I tried to rebuild the latest framework and resolver from the trunk, but I'm getting a compilation issue:

      [ERROR] /tmp/xx/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java:[44,8] org.apache.felix.framework.ResolveContextImpl is not abstract and does not override abstract method getSubstitutionWires(org.osgi.resource.Wiring) in org.apache.felix.resolver.FelixResolveContext
      

      Attachments

        1. felix.log
          59 kB
          Pierre De Rop

        Activity

          People

            Unassigned Unassigned
            pderop Pierre De Rop
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: