Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » NoSuchMethodError on EMFCompareStructureMergeViewer.createToolItems()
NoSuchMethodError on EMFCompareStructureMergeViewer.createToolItems() [message #1065541] Wed, 26 June 2013 12:27 Go to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Hi guys,

I've been testing the final 2.1.0 release. Aparently all my test-cases pass. However I found a weird exception when launching my UI util to open the compare editor. I attach the stack trace at the end of this post.

It looks like a compilation issue. I imported the sources of the bundle org.eclipse.emf.compare.ide.ui into my workspace, and without any changes, I exported it back as a .jar bundle. Added this to my target platform et voilà, everything worked as expected. Put the original release .jar, and the issue is back.

I fetched the release from:
http://www.eclipse.org/downloads/download.php?file=/modeling/emf/compare/downloads/drops/2.1.0/R201306101322/emf-compare-update-2.1.0.zip&protocol=http

We are using Eclipse version 3.6.2, and the code we use to call the editor looks like this:

AdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
CompareEditorInput input = new ComparisonEditorInput(new CompareConfiguration(), emfComparison, editingDomain, adapterFactory);
CompareUI.openCompareEditor(input);

The exception is:
java.lang.NoSuchMethodError: org.osgi.framework.Version.compareTo(Lorg/osgi/framework/Version;)I
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.EMFCompareStructureMergeViewer.createToolItems(EMFCompareStructureMergeViewer.java:602)
	at org.eclipse.compare.structuremergeviewer.DiffTreeViewer.initialize(DiffTreeViewer.java:226)
	at org.eclipse.compare.structuremergeviewer.DiffTreeViewer.<init>(DiffTreeViewer.java:155)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.EMFCompareStructureMergeViewer.<init>(EMFCompareStructureMergeViewer.java:156)
	at org.eclipse.emf.compare.ide.ui.internal.structuremergeviewer.EMFCompareStructureMergeViewerCreator.createViewer(EMFCompareStructureMergeViewerCreator.java:30)
	at org.eclipse.compare.internal.ViewerDescriptor.createViewer(ViewerDescriptor.java:63)
	at org.eclipse.compare.internal.CompareUIPlugin.getViewer(CompareUIPlugin.java:969)
	at org.eclipse.compare.internal.CompareUIPlugin.findStructureViewer(CompareUIPlugin.java:850)
	at org.eclipse.compare.CompareUI.findStructureViewer(CompareUI.java:312)
	at org.eclipse.compare.CompareEditorInput.findStructureViewer(CompareEditorInput.java:930)
	at org.eclipse.compare.internal.CompareStructureViewerSwitchingPane.getViewer(CompareStructureViewerSwitchingPane.java:84)
	at org.eclipse.compare.CompareEditorInput$10.getViewer(CompareEditorInput.java:714)
	at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:265)
	at org.eclipse.compare.internal.CompareStructureViewerSwitchingPane.setInput(CompareStructureViewerSwitchingPane.java:132)
	at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:746)
	at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:554)
	at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:456)
	at org.eclipse.compare.internal.CompareEditor.createPartControl(CompareEditor.java:414)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.compare.internal.CompareUIPlugin$1.run(CompareUIPlugin.java:523)
	at org.eclipse.compare.internal.CompareUIPlugin.syncExec(CompareUIPlugin.java:1263)
	at org.eclipse.compare.internal.CompareUIPlugin.internalOpenEditor(CompareUIPlugin.java:534)
	at org.eclipse.compare.internal.CompareUIPlugin.openCompareEditor(CompareUIPlugin.java:496)
	at org.eclipse.compare.CompareUI.openCompareEditorOnPage(CompareUI.java:168)
	at org.eclipse.compare.CompareUI.openCompareEditor(CompareUI.java:137)
	at org.eclipse.compare.CompareUI.openCompareEditor(CompareUI.java:121)
	at com.isb.hoba.compare.test.ui.CompareModels.run(CompareModels.java:158)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at com.opencanarias.mset.application.MsetApplication.start(MsetApplication.java:108)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)


Best Regards!
Víctor
Re: NoSuchMethodError on EMFCompareStructureMergeViewer.createToolItems() [message #1066344 is a reply to message #1065541] Tue, 02 July 2013 08:58 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
Registered: July 2009
Senior Member
Victor,

This is most likely a binary incompatibility between the version of Eclipse we've built against (Kepler) and the one you've installed EMF Compare in (Helios). org.osgi.framework.Version.compareTo has probably changed in a way that prevents compatibility. I'll take a look at that asap.

Laurent Goubet
Obeo
Re: NoSuchMethodError on EMFCompareStructureMergeViewer.createToolItems() [message #1066350 is a reply to message #1066344] Tue, 02 July 2013 09:17 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1639
Registered: July 2009
Senior Member
EMF Compare 2.1.0 is binary incompatible with Helios (OSGi framework 1.5). Please follow https://bugs.eclipse.org/bugs/show_bug.cgi?id=412075 for progress information Smile.

Laurent Goubet
Obeo
Re: NoSuchMethodError on EMFCompareStructureMergeViewer.createToolItems() [message #1066387 is a reply to message #1066350] Tue, 02 July 2013 12:03 Go to previous message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Thanks for the analysis, Laurent! It looks to me as the EMF Compare core remains compatible (we've been using it so far without any problem), and it's the UI support what became incompatible.

Cheers,
Víctor
Previous Topic:Bug on org.eclipse.emf.compare.ide.ui.internal.logical.EMFResourceMapping
Next Topic:Enhacement proposal on IdentifierEObjectMatcher
Goto Forum:
  


Current Time: Fri Dec 19 12:26:43 GMT 2014

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

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