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

NPE in BundleWiringImpl.searchImports

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: framework-4.0.2
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      JDK 6u31, Ubuntu

      Description

      NetBeans unit tests in the org.netbeans.core.osgi module pass but print a lot of stack traces when run against Felix 4.0.2:

      Apr 23, 2012 7:06:57 PM org.openide.util.lookup.implspi.ActiveQueue$Daemon run
      WARNING: Cannot process org.openide.util.WeakListenerImpl$ListenerReference@1ce1bea
      java.lang.NullPointerException
      at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1508)
      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1427)
      at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      at java.lang.Class.getMethod0(Class.java:2670)
      at java.lang.Class.getMethod(Class.java:1603)
      at org.openide.util.WeakListenerImpl$ListenerReference.getRemoveMethod(WeakListenerImpl.java:614)
      at org.openide.util.WeakListenerImpl$ListenerReference.run(WeakListenerImpl.java:572)
      at org.openide.util.lookup.implspi.ActiveQueue$Daemon.run(ActiveQueue.java:185)

      (The ActiveQueue thread in this case is looking for listeners attached via weak references which have since been collected, so that the stub listener can be cleanly detached from the observable object. It is impossible to guarantee exactly when this cleanup will run.)

      Presumably BundleRevisionImpl.m_wiring is null. searchImports should I think just treat this as if result==null. Can offer a patch if you like.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick@netbeans.org Jesse Glick
              • Votes:
                3 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: