You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "John Ross (JIRA)" <ji...@apache.org> on 2012/07/05 13:32:33 UTC

[jira] [Created] (ARIES-870) How to handle osgi.ee requirements.

John Ross created ARIES-870:
-------------------------------

             Summary: How to handle osgi.ee requirements.
                 Key: ARIES-870
                 URL: https://issues.apache.org/jira/browse/ARIES-870
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
            Reporter: John Ross


When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
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] (ARIES-870) How to handle osgi.ee requirements.

Posted by "Thomas Watson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478411#comment-13478411 ] 

Thomas Watson commented on ARIES-870:
-------------------------------------

I suspect that the user region is somehow hiding the system bundle from the subsystems implementation which ultimately causes the subsystems implementation to think it needs to provision a resource that provides the capabilities of the system bundle (stuff like the org.osgi.framework package).  The subsystems implementation knows there is this system bundle resource (somehow, not sure how) and it tries to setup a resolve operation against the resources of the subsystem along with the subsystem dependencies which will include this system bundle (org.eclipse.osgi).  That resolve operation appears to be failing which ultimately prevents any of the bundles from installing for the subsystem.
                
> How to handle osgi.ee requirements.
> -----------------------------------
>
>                 Key: ARIES-870
>                 URL: https://issues.apache.org/jira/browse/ARIES-870
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: John Ross
>
> When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ARIES-870) How to handle osgi.ee requirements.

Posted by "Glyn Normington (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477955#comment-13477955 ] 

Glyn Normington commented on ARIES-870:
---------------------------------------

I've noticed an issue when running the Aries subsystems implementation in the Virgo user region (!) which may be relevant. Here's a portion of a stack trace:

Caused by: org.osgi.service.subsystem.SubsystemException: org.osgi.service.resolver.ResolutionException: Unable to resolve file:/Users/glynnormington/aries-subsystems/virgo-kernel-3.6.0.CI-2012-10-15_20-52-58/hello.esa/hello.jar: missing requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: namespace=osgi.wiring.package, attributes={}, directives={filter=(&(osgi.wiring.package=org.osgi.framework)(version>=0.0.0))}, resource=file:/Users/glynnormington/aries-subsystems/virgo-kernel-3.6.0.CI-2012-10-15_20-52-58/hello.esa/hello.jar [caused by: Unable to resolve org.eclipse.osgi_3.8.1.v20120830-144521: missing requirement osgi.ee; filter:="(|(&(osgi.ee=JavaSE)(version=1.5))(&(osgi.ee=OSGi/Minimum)(version=1.2)))"]
	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:417)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:394)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:102)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:92)
	at org.apache.aries.subsystem.core.internal.InstallAction.createSubsystemResource(InstallAction.java:128)
	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:62)
	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.aries.subsystem.core.internal.AriesSubsystem.install(AriesSubsystem.java:252)
	at org.apache.aries.subsystem.core.internal.AriesSubsystem.install(AriesSubsystem.java:246)
	at demo.driver.HelloDriver.start(HelloDriver.java:19)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	... 61 common frames omitted
Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve file:/Users/glynnormington/aries-subsystems/virgo-kernel-3.6.0.CI-2012-10-15_20-52-58/hello.esa/hello.jar: missing requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: namespace=osgi.wiring.package, attributes={}, directives={filter=(&(osgi.wiring.package=org.osgi.framework)(version>=0.0.0))}, resource=file:/Users/glynnormington/aries-subsystems/virgo-kernel-3.6.0.CI-2012-10-15_20-52-58/hello.esa/hello.jar [caused by: Unable to resolve org.eclipse.osgi_3.8.1.v20120830-144521: missing requirement osgi.ee; filter:="(|(&(osgi.ee=JavaSE)(version=1.5))(&(osgi.ee=OSGi/Minimum)(version=1.2)))"]
	at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)
	at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:96)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:411)
	... 74 common frames omitted

The strange thing is that hello.jar doesn't need the osgi.ee capability (nor does it use BREE). Also, the system bundle is, of course, already resolved and there's only one system bundle in my system, so it's strange that the Felix resolver can't resolve it.

I'm not complaining about this stack trace - running inside the Virgo user region is likely to be the problem (as the user region doesn't allow any generic capabilities of the system bundle to be visible) - but it *may* help to inform the current issue.
                
> How to handle osgi.ee requirements.
> -----------------------------------
>
>                 Key: ARIES-870
>                 URL: https://issues.apache.org/jira/browse/ARIES-870
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: John Ross
>
> When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ARIES-870) How to handle osgi.ee requirements.

Posted by "John Ross (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479113#comment-13479113 ] 

John Ross commented on ARIES-870:
---------------------------------

Although it might not have been the cause, there was a bug in how the current wiring was being returned from the resolve context. See http://svn.apache.org/viewvc?view=revision&revision=1399722.
                
> How to handle osgi.ee requirements.
> -----------------------------------
>
>                 Key: ARIES-870
>                 URL: https://issues.apache.org/jira/browse/ARIES-870
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: John Ross
>
> When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ARIES-870) How to handle osgi.ee requirements.

Posted by "Glyn Normington (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479054#comment-13479054 ] 

Glyn Normington commented on ARIES-870:
---------------------------------------

I have since run the above scenario successfully from the command line. It was failing when Virgo was running under Eclipse. I have also successfully run the scenario from Eclipse on another machine. So I think the symptoms should be treated as unreproducible unless/until it reproduces predictably across more than one machine.
                
> How to handle osgi.ee requirements.
> -----------------------------------
>
>                 Key: ARIES-870
>                 URL: https://issues.apache.org/jira/browse/ARIES-870
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: John Ross
>
> When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ARIES-870) How to handle osgi.ee requirements.

Posted by "John Ross (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477968#comment-13477968 ] 

John Ross commented on ARIES-870:
---------------------------------

First, I'm surprised the resolver thinks it needs to resolve the system bundle as part of installing the subsystem. The subsystem's ResolveContext should be returning the system bundle as part of the current wiring which means the resolver should not attempt to resolve it. There might be a bug in the ResolveContext.

Second, the workaround to any resolution failures due to a missing osgi.ee capability is to have one of the subsystem's content bundles provide it. For example, in this case, adding

Provide-Capability: osgi.ee;osgi.ee=JavaSE;version=1.5

to the manifest of one of the content bundles should get around this issue.
                
> How to handle osgi.ee requirements.
> -----------------------------------
>
>                 Key: ARIES-870
>                 URL: https://issues.apache.org/jira/browse/ARIES-870
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>            Reporter: John Ross
>
> When working with the Resolver in order to compute dependencies and resolve subsystems, the ResolveContext will need to handle requests for osgi.ee capabilities. Currently, these capabilities need to be provided by resources packaged with the subsystems.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira