Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » LinkageError?(org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities)
LinkageError? [message #1259376] Fri, 28 February 2014 10:08 Go to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 357
Registered: July 2009
Senior Member
Hello,

i launch my Application as a Plug-In based Product. (launching works without any problems)
as i want to use the self update feature i need to turn it into a feature based product.

i added all features and plugins which i need to get it started.
but while launching i get the exception listed below

any ideas where this is coming from?

Thanks in advance

!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2014-03-04 13:46:19.252
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities.imageDescriptorFromURI(Lorg/eclipse/emf/common/util/URI;)Ljava/lang/Object;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/ui/internal/registry/ViewDescriptor, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/e4/ui/workbench/swt/util/ISWTResourceUtilities, have different Class objects for the type org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities.imageDescriptorFromURI(Lorg/eclipse/emf/common/util/URI;)Ljava/lang/Object; used in the signature
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:84)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:73)
	at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1396)
	at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1369)
	at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:924)
	at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:133)
	at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:684)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1667)
	at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2151)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4608)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
	at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
	at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:231)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1217)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:767)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:649)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1038)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at my.app.application.Application.start(Application.java:47)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities.imageDescriptorFromURI(Lorg/eclipse/emf/common/util/URI;)Ljava/lang/Object;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/ui/internal/registry/ViewDescriptor, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/e4/ui/workbench/swt/util/ISWTResourceUtilities, have different Class objects for the type org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities.imageDescriptorFromURI(Lorg/eclipse/emf/common/util/URI;)Ljava/lang/Object; used in the signature
	at org.eclipse.ui.internal.registry.ViewDescriptor.getImageDescriptor(ViewDescriptor.java:109)
	at org.eclipse.ui.internal.ViewReference.<init>(ViewReference.java:46)
	at org.eclipse.ui.internal.WorkbenchPage.createViewReferenceForPart(WorkbenchPage.java:1912)
	at org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout.createViewModel(ModeledPageLayout.java:376)
	at org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout.insertView(ModeledPageLayout.java:398)
	at org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout.addView(ModeledPageLayout.java:236)
	at my.app.application.Perspective.createInitialLayout(Perspective.java:14)
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3914)
	at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:675)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 53 more

[Updated on: Tue, 04 March 2014 13:42]

Report message to a moderator

Re: LinkageError? [message #1263401 is a reply to message #1259376] Tue, 04 March 2014 12:53 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 357
Registered: July 2009
Senior Member
sounds to me as eclipse is trying to load two different versions of a class from swt...

[Updated on: Tue, 04 March 2014 12:53]

Report message to a moderator

Re: LinkageError? [message #1264583 is a reply to message #1263401] Wed, 05 March 2014 10:37 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Are there two plugins with the same class (different version) in your run config?
Re: LinkageError? [message #1264591 is a reply to message #1264583] Wed, 05 March 2014 10:43 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 357
Registered: July 2009
Senior Member
thats what i thought too.
was not able to find one yet.
i'll remove ALL required plugins from all of my bundles and start all over including them. this will take some hours!

[Updated on: Wed, 05 March 2014 10:44]

Report message to a moderator

Re: LinkageError? [message #1265462 is a reply to message #1264591] Thu, 06 March 2014 05:59 Go to previous messageGo to next message
Ludwig Moser is currently offline Ludwig Moser
Messages: 357
Registered: July 2009
Senior Member
so finally after removing everything, and adding the required stuff again.
same problem!
i noticed its not an old libaray (what i expected, as my plugins are build on e3x basis and now moved to e4.
so i removed all required bundles which refer to an e4 gui element.
then added the e4 platform feature and voilĂ  the linkage error is gone!

seems there were two conflicting e4 ui classes/bundles/features
thanks!
Re: LinkageError? [message #1386915 is a reply to message #1265462] Mon, 23 June 2014 05:53 Go to previous message
Ludwig Moser is currently offline Ludwig Moser
Messages: 357
Registered: July 2009
Senior Member
in the meantime this error is coming back from time to time and i found an easy fix (though i do not know what causes this error to come up)

i simply need to clean the run configuration, and create a new one with the .product
everything works fine then! hope this helps some other folks too
Previous Topic:MinMaxAddon and Buttons
Next Topic:Perspective Editors only!
Goto Forum:
  


Current Time: Sat Nov 01 00:37:40 GMT 2014

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

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