Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo over-constraing version numbers?
Virgo over-constraing version numbers? [message #648696] Thu, 13 January 2011 23:00 Go to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
I'm having trouble with resolving, and I think I've traced (one of) the issues to a problem in how Virgo handles version specification. Let's look at the following plan:

[2011-01-13 19:50:19.138] fs-watcher                   <DE0500E> Unable to install application from URI 'file:/Developer/virgo/pickup/lineage.plan'. Cannot satisfy constraints for bundle 'org.apache.commons.cli' version '1.0.0.v20080604-1500'. Cannot resolve: org.apache.commons.cli
    Resolver report:
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.apache.commons.cli_1.0.0.v20080604-1500>
             constraint: <Require-Bundle: org.apache.commons.lang; bundle-version="[2.0.0,3.0.0)">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <lineage.model.editor.rap_1.0.0>
             constraint: <Require-Bundle: lineage.xpand; bundle-version="1.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <lineage.xpand_1.0.0>
             constraint: <Require-Bundle: org.eclipse.xpand; bundle-version="0.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.emf.mwe.utils_1.0.0.v201008251122>
             constraint: <Require-Bundle: org.eclipse.emf.mwe.core; bundle-version="0.0.0">
        A bundle could not be resolved because the required execution enviroment did not match the runtime environment. In bundle <org.apache.commons.lang_2.4.0.v201005080502>
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.emf.mwe.core_1.0.0.v201008251122>
             constraint: <Require-Bundle: org.apache.commons.cli; bundle-version="0.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.xpand_1.0.1.v201008251147>
             constraint: <Require-Bundle: org.eclipse.xtend; bundle-version="0.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.xtext.generator_1.0.1.v201008251220>
             constraint: <Require-Bundle: org.eclipse.xtend; bundle-version="1.0.1">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.emf.mwe2.launch_1.0.1.v201008251317>
             constraint: <Require-Bundle: org.apache.commons.cli; bundle-version="1.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.xtend_1.0.1.v201008251147>
             constraint: <Require-Bundle: org.eclipse.emf.mwe.core; bundle-version="0.0.0">
        A Require-Bundle could not be resolved. Caused by missing constraint in bundle <org.eclipse.xtend.typesystem.emf_1.0.1.v201008251147>
             constraint: <Require-Bundle: org.eclipse.xtend; bundle-version="0.0.0">
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.apache.commons.cli' at version '1.0.0.v20080604-1500': Cannot resolve: org.apache.commons.cli


I'm not sure I understand the last message, which reads to me like "I can't satisfy dependencies on myself". Smile

But I think the fundamental issue can be seen in the version number constraints. For org.eclipse.emf.mwe.core, we have: org.apache.commons.cli;visibility:=reexport with no version constraints. But for org.eclipse.emf.mwe2.launch, we do: org.apache.commons.cli;bundle-version="1.0.0" I'e noticed in the little bit of exploring that I've done that Virgo seems to interpret the lack of a version number narrowly. Could it be that somehow Virgo is seeing the requirements it has generated for "0.0.0" and "1.0.0" as incompatible?
Re: Virgo over-constraing version numbers? [message #648778 is a reply to message #648696] Fri, 14 January 2011 08:52 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Before we go any further, I'd like to know where these Require-Bundle headers are located so I can interpret the diagnostics more easily. We don't recommend using Require-Bundle because of the numerous semantic rough edges (enumerated in the OSGi spec) and so we don't use Require-Bundle in the Enterprise Bundle Repository (AFAIK) and bundlor won't generate Require-Bundle unless you explicitly code that header in the template.

The funny thing is, the diagnostics give the impression that the org.apache.commons.cli bundle has Require-Bundle headers and I have no idea why such headers would have been placed in Apache bundles.

That said, I am not aware of any particular limitations in Virgo's handling of Require-Bundle. Apart from any scoping which Virgo might apply (due to a PAR or a scope plan) or provisioning of missing dependencies, the header should be passed through pretty much as-is for Equinox to resolve.

Anyway, apart from that, you should probably sort out:
A bundle could not be resolved because the required execution enviroment did not match the runtime environment. In bundle <org.apache.commons.lang_2.4.0.v201005080502>

because that looks like a hard error in your environment and may be triggering the other resolution failures.
Previous Topic:Problems with singleton bundles
Next Topic:Building Virgo Kernel on Windows (7)
Goto Forum:
  


Current Time: Thu Apr 24 06:26:50 EDT 2014

Powered by FUDForum. Page generated in 0.01811 seconds