Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler(Unable to create class 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler')
org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715421] Sat, 13 August 2011 19:09 Go to next message
Christian Hanster is currently offline Christian Hanster
Messages: 22
Registered: March 2011
Junior Member
Hello Guys,

I have written a application with eclipse 4.0 but when I now want to start this application with 4.1 I get the following error:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2011-08-14 00:47:08.977
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler' from bundle '27'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "CocoaUIHandler.commandService": no actual value was found for the argument "ECommandService".
	at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:377)
	at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:372)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:97)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:310)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:237)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:153)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:64)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:241)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:130)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Can someone help me with this problem??
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715493 is a reply to message #715421] Sun, 14 August 2011 02:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 4462
Registered: July 2009
Senior Member
You are missing some addons which are necessary with 4.1. Use the wizard
to create a template e4 app and copy those addons into your own e4xmi-file

Tom

Am 14.08.11 01:09, schrieb christian-hanster:
> Hello Guys,
>
> I have written a application with eclipse 4.0 but when I now want to
> start this application with 4.1 I get the following error:
>
> !ENTRY org.eclipse.e4.ui.workbench 4 0 2011-08-14 00:47:08.977
> !MESSAGE Unable to create class
> 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler' from
> bundle '27'
> !STACK 0
> org.eclipse.e4.core.di.InjectionException: Unable to process
> "CocoaUIHandler.commandService": no actual value was found for the
> argument "ECommandService".
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:377)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:372)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:97)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:310)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:237)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:153)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:64)
>
> at
> org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:241)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:130)
>
> 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:344)
>
> 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:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> Can someone help me with this problem??
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715539 is a reply to message #715493] Sun, 14 August 2011 08:28 Go to previous messageGo to next message
Christian Hanster is currently offline Christian Hanster
Messages: 22
Registered: March 2011
Junior Member
Thank you for the quick reply. That was the problem:) Now the application starts and the first window is shown, but I have two windows (one login window and a second with the real application) To hide the one window and make the other window visible I used this code:
final String windowId="de.kvg-gymnasium.mobi.manager.MainWindow";
MUIElement e = ms.find(windowId, application);
e.setVisible(true);
e.setOnTop(true);
e.setToBeRendered(true);
ms.bringToTop(e);
	
// hide the others
for (MWindow window : application.getChildren()) {
	if (!e.getElementId().equals(window.getElementId())) {
		window.setVisible(false);
		window.setOnTop(false);
	}

That has worked fine with 4.0 but now it does not work any more.

Christian
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715554 is a reply to message #715539] Sun, 14 August 2011 09:21 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 4462
Registered: July 2009
Senior Member
Hi,

It's hard to say with out a minimal application to run locally. Might I
also suggest that instead of using windows you install a lifecycle
listener and open a popup shell and only proceed if the the login was
sucessfull.

Tom

Am 14.08.11 14:28, schrieb christian-hanster:
> Thank you for the quick reply. That was the problem:) Now the
> application starts and the first window is shown, but I have two windows
> (one login window and a second with the real application) To hide the
> one window and make the other window visible I used this code:
> final String windowId="de.kvg-gymnasium.mobi.manager.MainWindow";
> MUIElement e = ms.find(windowId, application);
> e.setVisible(true);
> e.setOnTop(true);
> e.setToBeRendered(true);
> ms.bringToTop(e);
>
> // hide the others
> for (MWindow window : application.getChildren()) {
> if (!e.getElementId().equals(window.getElementId())) {
> window.setVisible(false);
> window.setOnTop(false);
> }
> That has worked fine with 4.0 but now it does not work any more.
> Christian
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715583 is a reply to message #715554] Sun, 14 August 2011 12:53 Go to previous messageGo to next message
Christian Hanster is currently offline Christian Hanster
Messages: 22
Registered: March 2011
Junior Member
OK That's a good idea. I will look how to make it with a LifeCycleListener. Also I have made a small application that only switches between two windows and it works. So I looked again at my application to see what is different. The only thing I see is that there were some outputs on the console:
!ENTRY org.eclipse.ui 4 4 2011-08-14 18:38:48.873
!MESSAGE Unable to load UI activator

!ENTRY org.eclipse.ui 4 4 2011-08-14 18:38:48.874
!MESSAGE Unable to load UI activator
!STACK 0
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1087)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:297)
	at org.eclipse.ui.internal.WorkbenchPlugin.start(WorkbenchPlugin.java:845)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
	at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:164)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1130)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Perhaps you know something about this error.
The attachment is a simple application which switches between two windows

Christian
  • Attachment: test.zip
    (Size: 20.68KB, Downloaded 69 times)

[Updated on: Sun, 14 August 2011 18:22]

Report message to a moderator

Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #715624 is a reply to message #715583] Sun, 14 August 2011 18:21 Go to previous messageGo to next message
Christian Hanster is currently offline Christian Hanster
Messages: 22
Registered: March 2011
Junior Member
I have fixed the problem by "readding" the plugins to the run-configuration.
@Tom thank you very much for the very good and fast responses

Christian
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #728292 is a reply to message #715421] Thu, 22 September 2011 18:20 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 18
Registered: September 2011
Junior Member
I had the same problem and adding the actions to the e4xmi file fixed it. Very helpful. Now I'm trying to add a model fragment and running into the same problem when trying to included it with my app. Does the model fragment plugin need to somehow include those addons too? If so how? Tried adding them to the imports in the fragment's e4xmi but that seems to be a dead end.
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #728297 is a reply to message #728292] Thu, 22 September 2011 18:29 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 4462
Registered: July 2009
Senior Member
Am 23.09.11 00:20, schrieb grillo321:
> I had the same problem and adding the actions to the e4xmi file fixed
> it. Very helpful. Now I'm trying to add a model fragment and running
> into the same problem when trying to included it with my app. Does the
> model fragment plugin need to somehow include those addons too? If so
> how? Tried adding them to the imports in the fragment's e4xmi but that
> seems to be a dead end.

Why are you doing imports? The addon should be present in your main
e4xmi-File and through fragments you are contribution stuff.

Tom
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #728305 is a reply to message #728297] Thu, 22 September 2011 19:10 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 18
Registered: September 2011
Junior Member
Seems I don't adequately understand all of this yet. What I want to do is get rid of the dreaded:

!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler' from bundle '57'

I see this only when I add the fragment plugin to the run config of the main app. Without the fragment the app runs fine.
Re: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.CocoaUIHandler [message #728312 is a reply to message #728305] Thu, 22 September 2011 19:53 Go to previous message
Missing name Missing name is currently offline Missing name Missing name
Messages: 18
Registered: September 2011
Junior Member
Never mind. I had some junk accumulated in my run-time workspace. Working now.
Previous Topic:unable to run the the css example
Next Topic:E4 Eclipse product export wizard
Goto Forum:
  


Current Time: Thu May 23 08:51:00 EDT 2013

Powered by FUDForum. Page generated in 0.14136 seconds