Bug 478461 - Uses constraint violation prevents resolution of GEF4 bundles because of two dependency chains on javax.annotation (through org.eclipse.ogsi and com.google.guava)
Summary: Uses constraint violation prevents resolution of GEF4 bundles because of two ...
Status: REOPENED
Alias: None
Product: GEF
Classification: Tools
Component: Misc (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 476044 (view as bug list)
Depends on: 478465
Blocks:
  Show dependency tree
 
Reported: 2015-09-25 20:26 EDT by Marc-André Laperle CLA
Modified: 2016-02-03 13:02 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2015-09-25 20:26:21 EDT
I installed Mars.1 along with almost all features in the simrel update site,  which includes GEF4 MVC SDK 0.1.0.201506081138

When I start Eclipse, I get this error (among other simiar ones):

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.gef4.mvc [1416]
  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.gef4.mvc [osgi.identity; osgi.identity="org.eclipse.gef4.mvc"; type="osgi.bundle"; version:Version="0.1.0.201506081138"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"] and javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] via two dependency chains.

Chain 1:
  org.eclipse.gef4.mvc [osgi.identity; osgi.identity="org.eclipse.gef4.mvc"; type="osgi.bundle"; version:Version="0.1.0.201506081138"]
    require: (&(osgi.wiring.bundle=org.eclipse.osgi)(&(bundle-version>=3.9.0)(!(bundle-version>=4.0.0))))
     |
    provide: osgi.wiring.bundle: [org.eclipse.osgi, system.bundle]
  org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"]

Chain 2:
  org.eclipse.gef4.mvc [osgi.identity; osgi.identity="org.eclipse.gef4.mvc"; type="osgi.bundle"; version:Version="0.1.0.201506081138"]
    import: (&(osgi.wiring.package=com.google.common.collect)(&(version>=12.0.0)(!(version>=16.0.0))))
     |
    export: osgi.wiring.package=com.google.common.collect; uses:=javax.annotation
  com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="15.0.0.v201403281430"]
    import: (osgi.wiring.package=javax.annotation)
     |
    export: osgi.wiring.package: javax.annotation
  javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"]
	at org.eclipse.osgi.container.Module.start(Module.java:434)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Comment 1 Alexander Nyßen CLA 2015-09-26 05:21:19 EDT
Can you please install the Luna Compatibility features from http://download.eclipse.org/tools/gef/gef4/updates/releases and confirm that this resolve the problem?
Comment 2 Marc-André Laperle CLA 2015-09-26 16:45:13 EDT
(In reply to Alexander Nyßen from comment #1)
> Can you please install the Luna Compatibility features from
> http://download.eclipse.org/tools/gef/gef4/updates/releases and confirm that
> this resolve the problem?

It works, thanks! I just noticed though, the Mars.1 simrel [1] contains version 0.1.0.201506081138 for GEF but the repo you gave has 0.2.0.201509140217. Is this intentional? Does Mars.1 contain the right version?

[1] http://download.eclipse.org/releases/maintenance
Comment 3 Alexander Nyßen CLA 2015-09-27 11:51:53 EDT
(In reply to Marc-Andre Laperle from comment #2)
> (In reply to Alexander Nyßen from comment #1)
> > Can you please install the Luna Compatibility features from
> > http://download.eclipse.org/tools/gef/gef4/updates/releases and confirm that
> > this resolve the problem?
> 
> It works, thanks! I just noticed though, the Mars.1 simrel [1] contains
> version 0.1.0.201506081138 for GEF but the repo you gave has
> 0.2.0.201509140217. Is this intentional? Does Mars.1 contain the right
> version?
> 
> [1] http://download.eclipse.org/releases/maintenance

Yes, that's by intention. As announced on gef-dev, GEF4 0.2.0, which is part of the 3.10.1 (Mars.1) release, is not contributed to simrel update-site but only to the GEF4 releases site, because its not compatible to GEF4 0.1.0 (and we thus wanted to prevent updating 'by chance').
Comment 4 Alexander Nyßen CLA 2015-09-27 11:54:46 EDT
While this is not the exact same exception stack, its the same underlying problem as the one depicted in bug #476044. As such, resolving this as a duplicate.

*** This bug has been marked as a duplicate of bug 476044 ***
Comment 5 Alexander Nyßen CLA 2015-09-27 12:00:29 EDT
As #476044 involved another additional problem, decided to rather resolve bug #476044 as a duplicate of this bug.
Comment 6 Alexander Nyßen CLA 2015-09-27 12:01:31 EDT
*** Bug 476044 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Nyßen CLA 2015-09-27 12:06:43 EDT
Generalized title to indicate that this problem affects all GEF4 bundles that specify bundle dependencies on org.eclipse.osgi and have package imports on com.google.guava packages, i.e. o.e.g4.fx, o.e.g4.mvc, o.e.g4.mvc.fx, and o.e.g4.zest.fx, as reported in cross-projects bug #478465.
Comment 8 Alexander Nyßen CLA 2015-09-28 04:23:06 EDT
As documented in bug #476044, this seems to be reproducible in the Mars SDK (and the Luna SDK, as documented in bug #465682), but not in the IDE for committers or the IDE for Java developers. 

It seems that the IDEs already bundle com.google.guava (15.0.0), while the SDK does not contain Guava yet.
Comment 9 Alexander Nyßen CLA 2015-11-17 06:49:47 EST
Irrespective of the fact if we can fix the underlying issue, we should rename our *.compatibility.luna.* fragments and features to something more appropriate, e.g. *compatibility.equinox.*.
Comment 10 Alexander Nyßen CLA 2016-02-03 13:02:47 EST
(In reply to Alexander Nyßen from comment #9)
> Irrespective of the fact if we can fix the underlying issue, we should
> rename our *.compatibility.luna.* fragments and features to something more
> appropriate, e.g. *compatibility.equinox.*.

I applied above mentioned renamings for 4.0.0 M6.