Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Class loader error - two versions of Guava(was: Troubleshooting Guide for EMF Compare?)
Class loader error - two versions of Guava [message #1819260] Fri, 10 January 2020 15:31 Go to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 13
Registered: January 2017
Junior Member
Using the code from https://github.com/nbhusare/EMF-Compare/ as an example and the EMF Compare Developer Guide, I've created a customized DifferenceFilter, DiffBuilder, FeatureFilter and PostProcessor. I've got JUnit5 tests using sample XText based models that pass (Both models stored as strings and models loaded from files).

The next step is to get all of this hooked into the UI. That's where I'm having a problem. I've followed the directions from the Developer's Guide to set up the extnsion points, and I've added the Content Type Association in Eclipse. When I did this initially, it worked - intermittently. Now it doesn't work at all.

The problem I'm getting is a class loader error (see below)
Caused by: java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.honeywell.fractool.NoSemanticDifferenceFilter.getPredicateWhenSelected()Lcom/google/common/base/Predicate;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, com/honeywell/fractool/NoSemanticDifferenceFilter, and its superclass loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader), have different Class objects for the type com/google/common/base/Predicate used in the signature


I suspect this worked in the past simply because the load order is unstable and occasionally happened to be in an order that was OK.

My questions are:
1) How to I solve this?
2) More generally, is there a troubleshooting guide for this kind of thing that I can refer to?

Other notes: This problem originally started with Eclipse 2019-09 on a Windows 10 machine. I've updated to Eclipse 2019-12. I've got the latest version of EMF Compare available via the Marketplace (3.3.8.201909101346). BTW - note that this is not the version that the EMF Compare site says should be part of the 2019-12 release. Don't know why. The same problem occurs with both versions of Eclipse.

[Updated on: Tue, 14 January 2020 17:03]

Report message to a moderator

Re: Troubleshooting Guide for EMF Compare? [message #1819380 is a reply to message #1819260] Tue, 14 January 2020 08:08 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hello,

This problem means that you have multiple guava version in your environment, which usually doesn't end well. This likely happens because of the version of EMF Compare you're using, since I've only updated the version of Guava used by EMF Compare in 3.3.9.

The version you're getting through the marketplace is not the correct one because of an oversight on my part : I've forgotten to actually push the released 3.3.9 version so it is not available for download. It should now be available through either the marketplace or directly from https://download.eclipse.org/modeling/emf/compare/updates/releases/3.3/R201911051515

Regards,

Laurent Goubet
Obeo
Re: Troubleshooting Guide for EMF Compare? [message #1819407 is a reply to message #1819380] Tue, 14 January 2020 16:57 Go to previous messageGo to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 13
Registered: January 2017
Junior Member
I updated to 3.3.9. It looks like that fixed the problem. Thanks!
Re: Class loader error - two versions of Guava [message #1864481 is a reply to message #1819260] Tue, 19 March 2024 10:52 Go to previous message
Artur Barsuhn is currently offline Artur BarsuhnFriend
Messages: 1
Registered: March 2024
Junior Member
I happen to come across the same error.
Current version: EMF Compare 3.3 (current marketplace installation). Supporting guava are: [27.0.0,30.2.0) but we are already using guava_32.1.2 in our project.
Previous Topic:EMF Compare crashing when merging Sirius models
Goto Forum:
  


Current Time: Tue Apr 16 04:58:16 GMT 2024

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

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

Back to the top