0
votes

I'am a student and i try to create a meta-model using the EMF in eclipse. Now i try to add some OCL constraint in my meta-model, so,i try to used the OCLinEcore. Unfortunately, when i have clicked on my (*.ecore / open with / OCLinEcore editor) it shows in what follows error:

loader constraint violation: when resolving overridden method "org.eclipse.ocl.xtext.essentialocl.ui.contentassist.EssentialOCLProposalProvider.getProposalFactory(Ljava/lang/String;Lorg/eclipse/xtext/ui/editor/contentassist/ContentAssistContext;)Lcom/google/common/base/Function;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/ocl/xtext/essentialocl/ui/contentassist/EssentialOCLProposalProvider, and its superclass loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader), have different Class objects for the type com/google/common/base/Function used in the signature (occurred in org.eclipse.ocl.xtext.oclinecore.ui.OCLinEcoreExecutableExtensionFactory)

Can someone help me please to resolve this problem or there are some other method to add the OCL constraints to a meta-model?. Thank you in advance.

1

1 Answers

0
votes

have different Class objects for the type com/google/common/base/Function used in the signature

strongly suggests that you inconsistent Guava installations. Normally Eclipse OCL uses whatever version of Guava is required by Xtext. I suspect you have installed something else which has introduced a conflict.

Without details of your configuration it is hard to comment further. Check the plugins folder of your installation to see how many com.google.guava's you have. One is good. More than one can be trouble. I used to fight hard to stop Eclipse itself providing more than one Guava, but it was a losing battle.