felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Watson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3522) Regression related to uses clause with multiple package providers
Date Wed, 06 Jun 2012 14:57:23 GMT

    [ https://issues.apache.org/jira/browse/FELIX-3522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290191#comment-13290191
] 

Thomas Watson commented on FELIX-3522:
--------------------------------------

One nit in your testcase with the following code:

            Requirement req = wire.getRequirement();
            String pkgname = (String) req.getAttributes().get(PackageNamespace.PACKAGE_NAMESPACE);

My understanding is that the osgi.wiring.package namespace requirements (as constructed from
the Import-Package header) must have an empty attribute map since all the attributes are used
for the filter directive.  In my implementation of Requirement for the osgi.wiring.package
namespace I certainly have an empty map and this would return a null req.
                
> Regression related to uses clause with multiple package providers
> -----------------------------------------------------------------
>
>                 Key: FELIX-3522
>                 URL: https://issues.apache.org/jira/browse/FELIX-3522
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>            Reporter: Thomas Diesler
>         Attachments: test.log
>
>
> For this test
> https://github.com/tdiesler/jbosgi-resolver/blob/3.0/felix/src/test/java/org/jboss/test/osgi/resolver/UsesDirectiveResolverTest.java
> I get
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.116 sec <<<
FAILURE!
> testMultipleProviders(org.jboss.test.osgi.resolver.UsesDirectiveResolverTest)  Time elapsed:
0.096 sec  <<< ERROR!
> org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve
resource war.extender.jar [AbstractResource[war.extender.jar:0.0.0]] because it is exposed
to package 'javax.servlet' from resources javax.servlet.api [AbstractResource[javax.servlet.api:0.0.0]]
and http.service.provider [AbstractResource[http.service.provider:0.0.0]] via two dependency
chains.
> Chain 1:
>   war.extender.jar [AbstractResource[war.extender.jar:0.0.0]]
>     import: null
>      |
>     export: osgi.wiring.package=javax.servlet
>   javax.servlet.api [AbstractResource[javax.servlet.api:0.0.0]]
> Chain 2:
>   war.extender.jar [AbstractResource[war.extender.jar:0.0.0]]
>     import: null
>      |
>     export: osgi.wiring.package=org.ops4j.pax.web.service; uses:=javax.servlet
>     export: osgi.wiring.package=javax.servlet
>   http.service.provider [AbstractResource[http.service.provider:0.0.0]]
> 	at org.apache.felix.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1134)
> 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:197)
> 	at org.jboss.osgi.resolver.felix.StatelessResolver.resolve(StatelessResolver.java:57)
> 	at org.jboss.test.osgi.resolver.UsesDirectiveResolverTest.testMultipleProviders(UsesDirectiveResolverTest.java:158)

--
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

        

Mime
View raw message