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

Autoconf can't find Metatype service

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • autoconf-rp-0.1.0
    • autoconf-rp-0.1.4
    • Deployment Admin
    • None

    Description

      Although Autoconf appears to consult MetaTypeService to resolve OCDs in code it never will. This is caused by the fact that the bundle does not import org.osgi.service.metatype, but embeds it. Any actual MetaTypeService will not be assignable.

      The reason it doesn't fail is that the dependencymanager dependency is optional. As a result the AutoconfResourceProcessor operates against an injected NullObject. You never get any warning, but it simply never resolves OCDs.

      Besides fixing the import IMHO it would not be unreasnable to require MetaTypeService

      Index: autoconf/pom.xml
      ===================================================================
      --- autoconf/pom.xml    (revision 1245822)
      +++ autoconf/pom.xml    (working copy)
      @@ -86,7 +86,7 @@
                               <Bundle-Name>Apache Felix AutoConf Resource Processor</Bundle-Name>
                               <Bundle-Description>A customizer bundle that publishes a Resource Processor service that processes configuration resources shipped in a
       Deployment Package.</Bundle-Description>
                               <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
      -                        <Private-Package>org.apache.felix.deployment.rp.autoconf, org.apache.felix.metatype, org.apache.felix.metatype.internal.l10n, org.apach
      e.felix.metatype.internal, org.kxml2.io;-split-package:=merge-first, org.xmlpull.v1;-split-package:=merge-first, org.osgi.service.metatype;-split-package:=merge
      -first</Private-Package>
      +                        <Private-Package>org.apache.felix.deployment.rp.autoconf, org.apache.felix.metatype, org.apache.felix.metatype.internal.l10n, org.apach
      e.felix.metatype.internal, org.kxml2.io;-split-package:=merge-first, org.xmlpull.v1;-split-package:=merge-first</Private-Package>
                               <Export-Package>org.osgi.service.deploymentadmin.spi;version="1.0"</Export-Package>
                               <DeploymentPackage-Customizer>true</DeploymentPackage-Customizer>
                               <Deployment-ProvidesResourceProcessor>org.osgi.deployment.rp.autoconf</Deployment-ProvidesResourceProcessor>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bramk Bram de Kruijff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: