Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5772

OSGi Bundles with dash in Bundle-Symbolic-Name are not installable or updatable

    XMLWordPrintableJSON

Details

    Description

      The NetBeans Module System is based on "Code-Name-Base" module names. These names are formatted the same way as Java packages. OSGi uses "Symbolic Names" that are "mostly" like Java Packages, but the OSGi specification allows also a dash and an underscore to be part of that "symbolic-name" [1] and [2].

      In org.openide.modules.Dependency#checkCodeName() the check is that only a NetBeans CNB/Java package is a valid identifier. This will prevent modules to be installed or updated if they depend on these OSGi Bundles:

      java.lang.IllegalArgumentException: Malformed dot-separated identifier: org.apache.commons.commons-csv
      at org.openide.modules.Dependency.checkCodeName(Dependency.java:176)
      at org.openide.modules.Dependency.create(Dependency.java:254)
      at org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo.parseDeps(DummyModuleInfo.java:176)
      at org.netbeans.modules.autoupdate.updateprovider.DummyModuleInfo.<init>(DummyModuleInfo.java:97)
      at org.netbeans.modules.autoupdate.updateprovider.ModuleItem.getModuleInfo(ModuleItem.java:150)
      [catch] at org.netbeans.modules.autoupdate.services.UpdateUnitFactory.appendUpdateItems(UpdateUnitFactory.java:169)
      at org.netbeans.modules.autoupdate.services.UpdateUnitFactory.getUpdateUnits(UpdateUnitFactory.java:118)
      at org.netbeans.modules.autoupdate.services.UpdateManagerImpl$Cache.<init>(UpdateManagerImpl.java:267)
      at org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getCache(UpdateManagerImpl.java:227)
      at org.netbeans.modules.autoupdate.services.UpdateManagerImpl.getUpdateUnits(UpdateManagerImpl.java:96)
      at org.netbeans.api.autoupdate.UpdateManager.getUpdateUnits(UpdateManager.java:78)
      at org.netbeans.modules.autoupdate.ui.PluginManagerUI.updateUnitsChanged(PluginManagerUI.java:656)
      at org.netbeans.modules.autoupdate.ui.UnitTab$3.updateUnitsChanged(UnitTab.java:168)
      at org.netbeans.modules.autoupdate.ui.UnitCategoryTableModel.fireUpdataUnitChange(UnitCategoryTableModel.java:261)
      at org.netbeans.modules.autoupdate.ui.UnitTab.fireUpdataUnitChange(UnitTab.java:619)
      at org.netbeans.modules.autoupdate.ui.UnitTab$14$1.run(UnitTab.java:790)
      at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) 

       

      [1] http://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module.bsn

      [2] http://docs.osgi.org/specification/osgi.core/7.0.0/ch01.html#framework.general.syntax

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nigjo Jens Hofschröer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m