Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Mixed Mode and E4 Command/Handler Error
Mixed Mode and E4 Command/Handler Error [message #1090959] Tue, 20 August 2013 18:19 Go to next message
K Kumar is currently offline K Kumar
Messages: 18
Registered: March 2011
Junior Member
We have requirement to use 3.x views (for example, CNF) in 4.x app so we are using the "Mixed mode" as explained in http://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/

I have created the Application.e4xmi model with Controls and integrated 3.x CNF view along with pure E4 view and it is working.

In the application model file, I have defined a command and linked with a handler. But this is not working as when I try to run I'm getting following error. From the error it looks like, it is expecting the handler to be in 3.x design (implementing IHandler) but I thought as pure E4 view is working, pure E4 command/handler should be working as well. What am I missing?

Thank you for your help.

!ENTRY org.eclipse.ui 4 4 2013-08-20 15:16:12.339
!MESSAGE The proxied handler was the wrong class

!ENTRY org.eclipse.ui 4 0 2013-08-20 15:16:12.342
!MESSAGE The proxied handler was the wrong class
!STACK 0
java.lang.ClassCastException: com.test.core.handler.NewConnectionHandler cannot be cast to org.eclipse.core.commands.IHandler
	at org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:347)
	at org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(HandlerProxy.java:230)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.canExecute(E4HandlerProxy.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.isEnabled(HandlerServiceHandler.java:55)
	at org.eclipse.core.commands.Command.isEnabled(Command.java:862)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.registerLegacyHandler(LegacyHandlerService.java:162)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.readDefaultHandlers(LegacyHandlerService.java:722)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.readRegistry(LegacyHandlerService.java:635)
	at org.eclipse.ui.internal.Workbench$48.runWithException(Workbench.java:2257)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
	at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:2252)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1550)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2702)
	at org.eclipse.ui.internal.Workbench.access$7(Workbench.java:2591)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:608)
	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.test.core.Application.start(Application.java:21)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	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)

[Updated on: Tue, 20 August 2013 18:19]

Report message to a moderator

Re: Mixed Mode and E4 Command/Handler Error [message #1097379 is a reply to message #1090959] Thu, 29 August 2013 12:22 Go to previous message
K Kumar is currently offline K Kumar
Messages: 18
Registered: March 2011
Junior Member
I'm not sure what was the problem, but restarted from scratch and commands in mixed mode is working fine. I couldn't figure out a reason for it to fail in first try.
Previous Topic:No e4 support for a simple scenario?
Next Topic:LoginDialog in LifeCycleManager
Goto Forum:
  


Current Time: Sat Apr 19 02:56:49 EDT 2014

Powered by FUDForum. Page generated in 0.01621 seconds