Papyrus Compare problems with RCP based on 2019-12 [message #1819575] |
Fri, 17 January 2020 13:43 |
Oliver Gardiner Messages: 50 Registered: May 2014 Location: Oxford, UK |
Member |
|
|
I've recently updated our RCP based on Papyrus to pull in the latest 2019-12 release. The one problem I now have is that Papyrus Compare is failing when I open a compared model. Looking at the workspace log, it looks as though there may be an issue with versions of Guava between EMF Compare (3.3.9) and Papyrus Compare (Nightly 20191104). The log is below:
!ENTRY org.eclipse.emf.compare.ide.ui 4 0 2020-01-17 13:17:14.110
!MESSAGE org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.papyrus.compare.uml2" was unable to instantiate class "org.eclipse.papyrus.compare.uml2.internal.postprocessor.PapyrusPostProcessor".
!STACK 0
java.lang.RuntimeException: org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.papyrus.compare.uml2" was unable to instantiate class "org.eclipse.papyrus.compare.uml2.internal.postprocessor.PapyrusPostProcessor".
at org.eclipse.emf.compare.rcp.extension.PluginClassDescriptor.createInstance(PluginClassDescriptor.java:70)
at org.eclipse.emf.compare.rcp.internal.postprocessor.PostProcessorDescriptor.getPostProcessor(PostProcessorDescriptor.java:79)
at org.eclipse.emf.compare.rcp.internal.postprocessor.PostProcessorRegistryImpl.getPostProcessors(PostProcessorRegistryImpl.java:136)
at org.eclipse.emf.compare.EMFCompare.compare(EMFCompare.java:226)
at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.EMFCompareStructureMergeViewer.compareInputChanged(EMFCompareStructureMergeViewer.java:1599)
at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.EMFCompareStructureMergeViewer$CompareInputChangedJob.run(EMFCompareStructureMergeViewer.java:224)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.core.runtime.CoreException: Plug-in "org.eclipse.papyrus.compare.uml2" was unable to instantiate class "org.eclipse.papyrus.compare.uml2.internal.postprocessor.PapyrusPostProcessor".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:206)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:929)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
at org.eclipse.emf.compare.rcp.extension.PluginClassDescriptor.createInstance(PluginClassDescriptor.java:68)
... 6 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind(Lorg/eclipse/emf/compare/DifferenceKind;)Lcom/google/common/base/Predicate;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/papyrus/compare/uml2/internal/postprocessor/PapyrusPostProcessor, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/eclipse/emf/compare/utils/EMFComparePredicates, have different Class objects for the type com/google/common/base/Predicate used in the signature
at org.eclipse.papyrus.compare.uml2.internal.postprocessor.PapyrusPostProcessor.<clinit>(PapyrusPostProcessor.java:86)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:204)
... 10 more
As far as I can make out, the Class files for (Guava) Predicate in the call to the EMF "ofKind" method are different, which I assume means that they've been compiled against different versions of Guava.
My RCP build doesn't (any more) directly pull in EMF Compare so it gets pulled in as a dependency of Papyrus Compare - not sure if bumping EMF Compare down to 3.3.8 would fix it (for now) but no idea how I would do this.
Any help very gratefully received!
Thanks,
Oliver
|
|
|
|
Re: Papyrus Compare problems with RCP based on 2019-12 [message #1819686 is a reply to message #1819576] |
Tue, 21 January 2020 12:26 |
|
Hi Oliver,
hi Thomas,
thanks for the notification!
EMF Compare upgraded its Guava dependency. I remember that we decided to wait with upgrading Papyrus Compare so that we don't break compatibility with the last few Papyrus releases.
Now it looks like the recent two Papyrus versions are also compatible with the newer Guava version, so we could upgrade Papyrus Compare's Guava dependency as well while still supporting at least the last two Papyrus versions.
We'll look into that in the next couple of weeks. Please be aware that this upgrade will likely break compatibility with Papyrus <= 2019-06.
Thanks and best wishes,
Philip
--
Philip Langer
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03398 seconds