Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Linkage error due to the incompatible Guava versions
Linkage error due to the incompatible Guava versions [message #1327630] Fri, 02 May 2014 08:54 Go to next message
Ondrej Ilcik is currently offline Ondrej IlcikFriend
Messages: 3
Registered: December 2010
Junior Member
Hi there,

I'm encountering the aforementioned issue while using Sirius. Detailed stack trace attached. I guess this is because my current installation contains various Guava versions (10, 11, 15) and Sirius is using a different version than Acceleo. I'm aware of some related bugs and work in progres for Luna (like here or here and also some effort to handle this issue globally).

What I'm asking for is whether there is a known workaround which would allowed me to use Sirius in my current Kepler installation. Unfortunatelly I cannot reduce the number of available versions of Guava (especially not the v15) as there are other projects depending on it.

Thank you for any help you can provide.


Stack trace:
java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.acceleo.parser.interpreter.CompilationContext.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/util/Set;Lcom/google/common/collect/Multimap;Ljava/util/Set;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/sirius/common/acceleo/mtl/business/internal/interpreter/AcceleoMTLInterpreter, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/acceleo/parser/interpreter/CompilationContext, have different Class objects for the type onContext.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/util/Set;Lcom/google/common/collect/Multimap;Ljava/util/Set;)V used in the signature
at org.eclipse.sirius.common.acceleo.mtl.business.internal.interpreter.AcceleoMTLInterpreter.createCompilationContext(AcceleoMTLInterpreter.java:570)
at org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoProposalProvider.getProposals(AcceleoProposalProvider.java:125)
at org.eclipse.sirius.common.tools.api.interpreter.CompoundInterpreter.getProposals(CompoundInterpreter.java:785)
at org.eclipse.sirius.ui.tools.api.assist.TextContentProposalProvider.getProposals(TextContentProposalProvider.java:88)
at org.eclipse.jface.fieldassist.ContentProposalAdapter.getProposals(ContentProposalAdapter.java:2034)



Re: Linkage error due to the incompatible Guava versions [message #1333724 is a reply to message #1327630] Mon, 05 May 2014 07:36 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 02/05/2014 14:07, Missing name Mising name a écrit :
> Hi there,

Hi.

> I'm encountering the aforementioned issue while using Sirius. Detailed
> stack trace attached. I guess this is because my current installation
> contains various Guava versions (10, 11, 15) and Sirius is using a
> different version than Acceleo. I'm aware of some related bugs and work
> in progres for Luna (like
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=428976 or
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=429682 and also some
> effort to handle this issue
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=427862).
>
> What I'm asking for is whether there is a known workaround which would
> allowed me to use Sirius in my current Kepler installation.
> Unfortunatelly I cannot reduce the number of available versions of Guava
> (especially not the v15) as there are other projects depending on it.

It really depends on which versions of Sirius and Acceleo you use.
- Sirius 0.9 up to and including 1.0.0M5 had a strict version dependency
towards Guava 11.0.2 *and* exposed Guava-specific types in its API,
which is a bad combination, and probably the cause of the error you see.
- Sirius 1.0.0M6 still exposes Guava-specific types, but is more
flexible and accepts any Guava version from 11 to 15 (included). From
what I understand of OSGi there are still possible errors in this case,
but in less situations.
- Sirius 1.0.0M7 which will be released this week, does not expose
Guava-specific types anymore (at least in its API). As long as other
components do not use internal methods that still do expose some Guava,
M7 should normally be free of these kinds of problems.

Note that Sirius 1.0.0M7 (and 1.0.0), even if it is part of the Luna
release train and milestones, is still compatible with Kepler (just be
sure to use the Kepler-specific update-site).

If you can, I would advise to upgrade to M7 as soon as it is available,
or even better to test a recent nightly [1] to help us verify the issue
is indeed fixed for M7 (and tell us if you still have problems). If you
can not upgrade, the only option I see is to make sure Xtext and the
Sirius Xtext integation plug-in (org.eclipse.sirius.common.xtext) are
not installed (if you do not need them). Beside Sirius and Acceleo
themselves, Xtext is another modeling component that requires Guava.
Depending on whether it is installed or not may have an effect on which
version of Guava is resolved for Sirius and Acceleo.

In any case, can you give us the exact version numbers of Sirius and
Acceleo (and Xtext if installed) with which you saw the error?

Regards,
Pierre-Charles David

[1] http://download.eclipse.org/sirius/updates/nightly/latest/kepler


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Linkage error due to the incompatible Guava versions [message #1336929 is a reply to message #1333724] Tue, 06 May 2014 16:35 Go to previous messageGo to next message
Ondrej Ilcik is currently offline Ondrej IlcikFriend
Messages: 3
Registered: December 2010
Junior Member
Hi David,

thanks for your clear and helpful explanation. You are 100% correct.

So, to sum it up, my current Eclipse installation consists basically of Kepler SR2 RCP and various plugins, most notable being CDT, Xtend, Code Recommenders and Acceleo 3.4.2. There are 3 guava plugins able to co-exist and being loaded together:

  • Guava 15 required by e.g. Code Recommenders 2
  • Guava 11 (?)
  • Guava 10 required by e.g. Xtend

Some plugins also carry built-in version of Guava (Guava 13 by Window Builder etc.)

I have tried 3 versions of Sirius with these results:

  • Sirius 0.9.0 - does not work
  • Sirius 1.0.0M6 - works
  • Sirius 1.0.0 Night (20140506) - works

No thorough testing, but it works where 0.9.0 throw the exception.

So maybe this will help others. Btw, altough we hope for a quick transition to Luna, it's definitely good to hear Sirius 1.0 will support both Luna and Kepler.

Once again, thanks for your help.
Regards,

Ondrej Ilcik
Re: Linkage error due to the incompatible Guava versions [message #1338447 is a reply to message #1336929] Wed, 07 May 2014 08:09 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 06/05/2014 18:35, Ondrej Ilcik a écrit :
> Sirius 0.9.0 - does not work
> Sirius 1.0.0M6 - works
> Sirius 1.0.0 Night (20140506) - works

Thanks, good to have confirmation from an external party this is indeed
fixed as we expected.

> No thorough testing, but it works where 0.9.0 throw the exception.
>
> So maybe this will help others. Btw, altough we hope for a quick
> transition to Luna, it's definitely good to hear Sirius 1.0 will support
> both Luna and Kepler.

And Juno too, although you need to manually add some update-sites for
some stuff we need that is not visible from a plain Juno install; see
https://wiki.eclipse.org/Sirius/1.0.0M6.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Adding options to the style properties view
Next Topic:Sirius as a viewer
Goto Forum:
  


Current Time: Fri Apr 19 07:06:44 GMT 2024

Powered by FUDForum. Page generated in 0.03290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top