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

org.apache.felix.webconsole.internal.compendium.BaseConfigManager.getAttributeDefinitionMap(): implementation does not properly handle Configuration instances of a ManagedServiceFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • webconsole-1.2.0
    • Web Console
    • None

    Description

      The implementation of org.apache.felix.webconsole.internal.compendium.BaseConfigManager.getAttributeDefinitionMap(): does not properly handle Configuration instances of a ManagedServiceFactory.

      In fact, if such a Configuration instance is passed in as a parameter, the method will throw an exception, because there is no ObjectClassDefinition available for the instance.

      Example:
      A Configuration instance for the ManagedServiceFactory "net.wimpi.telnetd.service.TelnetListenerServiceFactory" was created through the ConfigurationAdmin that assigned the pid "net.wimpi.telnetd.service.TelnetListenerServiceFactory-1212198114040-7". Given that the method will try to obtain an ObjectClassDefinition for "net.wimpi.telnetd.service.TelnetListenerServiceFactory-1212198114040-7", an exception will be thrown, because no such OCD is available.

      Fix:
      The method needs to check if the Configuration instance has a factoryPid assigned, and should use the factoryPid to obtain the ObjectClassDefinition corresponding to the ManagedServiceFactory.

      Also observed in revision 662145 SVN repository.

      Attachments

        1. ConfigManagerBase.java.diff
          0.9 kB
          Dieter Wimberger

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              wimpi Dieter Wimberger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: