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

NPE "name can't be null" when trying to install a bundle in Felix 2.0.3

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • framework-2.0.3
    • framework-2.0.5
    • Main
    • None
    • Java 5 on OS X 10.5, but I don't think that matters

    Description

      The following exception is thrown when trying to install a bundle in Felix 2.0.3; it worked fine in 2.0.2 and older versions. Bundles such as Security, Log and Prefs can be installed w/o problems, though.

      [java] org.osgi.framework.BundleException: Could not create bundle object.
      [java] at org.apache.felix.framework.Felix.installBundle(Felix.java:2483)
      [java] at org.apache.felix.framework.Felix.installBundle(Felix.java:2330)
      [java] at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:122)
      [java] at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:108)
      [java] at host.Main.fileNew(Main.java:97)
      [java] at host.Main.filePresentAtStartup(Main.java:126)
      [java] at host.DirectoryWatcher.addListener(DirectoryWatcher.java:82)
      [java] at host.Main.main(Main.java:33)

      [java] Caused by: java.lang.NullPointerException: name can't be null
      [java] at java.security.BasicPermission.init(BasicPermission.java:82)
      [java] at java.security.BasicPermission.<init>(BasicPermission.java:120)
      [java] at org.osgi.framework.BundlePermission.<init>(BundlePermission.java:136)
      [java] at org.osgi.framework.BundlePermission.<init>(BundlePermission.java:126)
      [java] at org.apache.felix.framework.FelixResolverState.getMatchingFragments(FelixResolverState.java:810)
      [java] at org.apache.felix.framework.FelixResolverState.addHost(FelixResolverState.java:702)
      [java] at org.apache.felix.framework.FelixResolverState.addModule(FelixResolverState.java:70)
      [java] at org.apache.felix.framework.BundleImpl.addModule(BundleImpl.java:1108)
      [java] at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:80)
      [java] at org.apache.felix.framework.Felix.installBundle(Felix.java:2425)

      This is the manifest being used:

      Bundle-Name: Square
      Bundle-Description: A bundle that implements some plugin functionality
      Bundle-Vendor: Ulf
      Bundle-Version: 1.0.0
      Bundle-Activator: plugin2.Square
      Import-Package: org.osgi.framework,api

      Let me know what other information might be pertinent.

      Attachments

        Issue Links

          Activity

            People

              karlpauls Karl Pauls
              udittmer Ulf Dittmer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: