Marko Zadravec
Marko Zadravec

Reputation: 8730

Scout crash at launching SWT

I have some strange error in Scout Eclipse. My college push some cone in git and I pull it out. On his computer everything works well, but on mine it's get error when launching SWT.

Error is :

!ENTRY org.eclipse.e4.ui.workbench 4 0 2014-06-26 09:44:21.234
!MESSAGE Unable to create class'org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon' from bundle '72'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.e4.ui.bindings.internal.BindingTable.addBinding(Lorg/eclipse/jface/bindings/Binding;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/e4/ui/workbench/swt/util/BindingProcessingAddon, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for the method's defining class, org/eclipse/e4/ui/bindings/internal/BindingTable, have different Class objects for the type org/eclipse/jface/bindings/Binding 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.internalMake(InjectorImpl.java:333)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:267)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:276)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:581)
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 com.sixt.test.ldaplogintwo.ui.swt.application.Application.startSecure(Application.java:35)
at com.sixt.test.ldaplogintwo.ui.swt.application.Application$1.run(Application.java:27)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at com.sixt.test.ldaplogintwo.ui.swt.application.Application.start(Application.java:24)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
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 method "org.eclipse.e4.ui.bindings.internal.BindingTable.addBinding(Lorg/eclipse/jface/bindings/Binding;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/e4/ui/workbench/swt/util/BindingProcessingAddon, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for the method's defining class, org/eclipse/e4/ui/bindings/internal/BindingTable, have different Class objects for the type org/eclipse/jface/bindings/Binding used in the signature
at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBinding(BindingProcessingAddon.java:184)
at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTable(BindingProcessingAddon.java:168)
at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTables(BindingProcessingAddon.java:151)
at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.init(BindingProcessingAddon.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 31 more

I really try to make it works but I am running out of ideas.

Upvotes: 0

Views: 825

Answers (3)

Daniel
Daniel

Reputation: 11

I had the same problem, and just wanted to let the fix registered here.

I opened the file bundles.info located in *<Eclipse_install_folder*>\configuration\org.eclipse.equinox.simpleconfigurator\

I searched for rap.jface, deleted everything that was found and saved the file.

Then the Eclipse was able to start again.

I was using Eclipse Mars by the way.

Upvotes: 1

Serano Colameo
Serano Colameo

Reputation: 1

I had this issue as well and fix it by removing the org.eclipse.rap.jface plugin dependency in the client product file.

That should do the trick (at least for us because we have only SWT clients).

~Serano

Upvotes: 0

Jmini
Jmini

Reputation: 9497

== Ensure you are using the same target Platform as your colleague

Open Preferences > Plug-in development > Target Platform. You should have the same active target platform definition.

If you use running platform as active target definition, you should have exaclty the same Eclipse IDE installation to be able to compare.

== Ensure you start the application the same way

Open the client product file for example:

/<your-app>.ui.swt/products/development/<app>-swt-client-dev.product

Click on the Synchronize link in the testing section in the overview tab. (sometime you need to do this operation twice).

Start the application with the run or debug button in the same section.

Eclipse product file editor

== Test an other scout application on your computer

To determine if your eclipse scout IDE installation is OK or not, what happend when you create a test application in an other workspace? Do you manage to start it?

== Verify the content of your target platform

@marko-zadravec suggested to verify if you do not have 2 version of org.eclipse.jface in your target platform.

In the "Target Platform" preference page, select your active target definition in the list and click on the Edit button.

Switch to the Content tab. Check if you havent two org.eclipse.jface bundles.

== Reinstall the IDE

Sometimes reinstalling Eclipse for Scout Developers is the quickest solution to solve those kind of problems (Go to the Eclipse Downloads page).

Upvotes: 1

Related Questions