Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1429

NullPointerException at org.apache.aries.subsystem.core.internal.WovenClassListener.modified at org.apache.aries.subsystem.core.internal.RegionUpdater.addRequirements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • subsystem-2.0.4
    • subsystem-2.0.6
    • Subsystem
    • None

    Description

      A NullPointerException [1] may occur while updating a region as part of adding dynamic imports to the sharing policy for a bundle containing a woven class. This will only occur when something outside of the subsystems implementation for whatever reason has deleted the region digraph edge that connects the parent subsystem to the subsystem containing the bundle whose class is being woven as a constituent.

      Still, it would be useful if the implementation would allow this by replacing the NPE with a noop. In other words, if the implementation does not find an existing edge between parent and child, it would simply assume that something else is handling the dynamic imports.

      [1]
      org.osgi.service.subsystem.SubsystemException: java.lang.NullPointerException
      at org.apache.aries.subsystem.core.internal.WovenClassListener.modified(WovenClassListener.java:125)
      at org.eclipse.osgi.internal.weaving.WovenClassImpl$1.call(WovenClassImpl.java:203)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHookPrivileged(ServiceRegistry.java:1280)
      at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyHooksPrivileged(ServiceRegistry.java:1263)
      at org.eclipse.osgi.internal.weaving.WovenClassImpl.notifyWovenClassListeners(WovenClassImpl.java:220)
      at org.eclipse.osgi.internal.weaving.WovenClassImpl.callHooks(WovenClassImpl.java:271)
      at org.eclipse.osgi.internal.weaving.WeavingHookConfigurator.processClass(WeavingHookConfigurator.java:56)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:616)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
      at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:330)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:407)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
      at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:757)
      at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:711)
      at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:951)
      at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:328)
      at org.eclipse.osgi.container.Module.doStart(Module.java:566)
      at org.eclipse.osgi.container.Module.start(Module.java:434)
      at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
      at org.apache.aries.subsystem.core.internal.StartAction.startBundleResource(StartAction.java:337)
      at org.apache.aries.subsystem.core.internal.StartAction.startResource(StartAction.java:365)
      at org.apache.aries.subsystem.core.internal.StartAction.run(StartAction.java:128)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.aries.subsystem.core.internal.BasicSubsystem.start(BasicSubsystem.java:295)
      ...
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.apache.aries.subsystem.core.internal.RegionUpdater.addRequirements(RegionUpdater.java:106)
      at org.apache.aries.subsystem.core.internal.RegionUpdater.addRequirements(RegionUpdater.java:60)
      at org.apache.aries.subsystem.core.internal.WovenClassListener.modified(WovenClassListener.java:122)
      ... 39 more

      Attachments

        Activity

          People

            jwross@us.ibm.com John Ross
            jwross@us.ibm.com John Ross
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: