You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Bram de Kruijff (Created) (JIRA)" <ji...@apache.org> on 2012/02/19 23:24:46 UTC

[jira] [Created] (FELIX-3355) Autoconf can't find Metatype service

Autoconf can't find Metatype service
------------------------------------

                 Key: FELIX-3355
                 URL: https://issues.apache.org/jira/browse/FELIX-3355
             Project: Felix
          Issue Type: Bug
          Components: Deployment Admin
    Affects Versions: autoconf-rp-0.1.0
            Reporter: Bram de Kruijff


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


{code}
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>
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3355) Autoconf can't find Metatype service

Posted by "Marcel Offermans (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211824#comment-13211824 ] 

Marcel Offermans commented on FELIX-3355:
-----------------------------------------

I agree that we should fix the import, preferably whilst still keeping the bundle self-contained. So that API package should be substitutable.

I do not agree it is reasonable to require MetaTypeService as that would contradict the spec (115.3.4): "If the reference cannot be found in this file, it must consult the Meta Type service (if present) for the bundle that is associated with the PID that is configured.". To me the "if present" clearly states that we must not require it.
                
> Autoconf can't find Metatype service
> ------------------------------------
>
>                 Key: FELIX-3355
>                 URL: https://issues.apache.org/jira/browse/FELIX-3355
>             Project: Felix
>          Issue Type: Bug
>          Components: Deployment Admin
>    Affects Versions: autoconf-rp-0.1.0
>            Reporter: Bram de Kruijff
>
> 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
> {code}
> 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>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira