Community
Participate
Working Groups
Created attachment 284099 [details] ClassCastException Customer was using RAD 9 before and their HATS(Host Access transformation Service) RCP application worked fine after the export.They have done some customizations in their code and involves few eclipse code and plugins in their project. They have now migrated to RAD 9.6 and HATS RCP application runs fine inside the HATS toolkit. Now they are unable to run the project. After the eclipse product is exported when user tries to run the eclipse.exe file, the application runs in background and RCP screen does not come up.The error comes as soon as PlatformUI.createAndRunWorkbench gets called. Have attached the log file for more information. The log file gives the following error: org.eclipse.e4.core.di.InjectionException: java.lang.ClassCastException: org.eclipse.e4.ui.model.application.ui.menu.impl.ToolControlImpl cannot be cast to org.eclipse.emf.ecore.EObject at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:118) at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:73) at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1531) at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1505) at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:923)
This is strange, ToolControlImpl *does* implement the EObject interface (it extends BasicEObjectImpl which implements EObject). Will be very hard to analyze this problem without access to the source/environment where the problem occurs. It should be analyzed why the class cannot be cast, probably it is some classpath issue in which the EObject is loaded twice. Which version of Eclipse are you using?
Thanks for your response. We are using RAD 9.6.1.4 and the eclipse version is 4.6.3.v20170301-0400. And the JRE version is 1.8.0_241.