Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a Flowable diagram in eclipse: Version: 2024-06 (4.32.0) Build id: 20240606-1231 #19

Open
ron-majumdar opened this issue Jul 10, 2024 · 1 comment

Comments

@ron-majumdar
Copy link

java.lang.ClassCastException: class org.eclipse.jdt.internal.core.JavaNature cannot be cast to class org.eclipse.jdt.core.IJavaProject (org.eclipse.jdt.internal.core.JavaNature and org.eclipse.jdt.core.IJavaProject are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2d9f03c9)
at org.activiti.designer.util.extension.ExtensionUtil.getDisabledPaletteEntries(ExtensionUtil.java:109)
at org.activiti.designer.diagram.ActivitiToolBehaviorProvider.pruneDisabledPaletteEntries(ActivitiToolBehaviorProvider.java:969)
at org.activiti.designer.diagram.ActivitiToolBehaviorProvider.getPalette(ActivitiToolBehaviorProvider.java:686)
at org.eclipse.graphiti.ui.internal.editor.GFPaletteRoot.updatePaletteEntries(GFPaletteRoot.java:113)
at org.eclipse.graphiti.ui.internal.editor.GFPaletteRoot.(GFPaletteRoot.java:89)
at org.eclipse.graphiti.ui.editor.DefaultPaletteBehavior.createPaletteRoot(DefaultPaletteBehavior.java:110)
at org.eclipse.graphiti.ui.editor.DefaultPaletteBehavior.getPaletteRoot(DefaultPaletteBehavior.java:122)
at org.eclipse.graphiti.ui.editor.DiagramBehavior.getPaletteRoot(DiagramBehavior.java:795)
at org.eclipse.graphiti.ui.editor.DiagramEditor.getPaletteRoot(DiagramEditor.java:439)
at org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.setEditDomain(GraphicalEditorWithFlyoutPalette.java:164)
at org.eclipse.graphiti.ui.editor.DiagramEditor.setEditDomain(DiagramEditor.java:848)
at org.eclipse.graphiti.ui.editor.DiagramBehavior.initConfigurationProvider(DiagramBehavior.java:1438)
at org.eclipse.graphiti.ui.editor.DiagramBehavior.setInput(DiagramBehavior.java:389)
at org.eclipse.graphiti.ui.editor.DiagramEditor.setInput(DiagramEditor.java:307)
at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.setInput(ActivitiDiagramEditor.java:409)
at org.eclipse.graphiti.ui.editor.DiagramEditor.init(DiagramEditor.java:224)
at org.activiti.designer.eclipse.editor.ActivitiDiagramEditor.init(ActivitiDiagramEditor.java:154)
at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:353)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:344)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:977)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:939)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:386)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:312)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:203)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:59)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:991)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:105)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:183)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4814)
at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:206)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:201)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:131)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:73)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:168)
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:187)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:654)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:618)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:796)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1271)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3228)
at org.eclipse.ui.internal.WorkbenchPage.lambda$11(WorkbenchPage.java:3118)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3116)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3086)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3069)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:345)
at org.activiti.designer.eclipse.editor.Bpmn2DiagramCreator$1.run(Bpmn2DiagramCreator.java:68)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4058)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3676)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:168)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:370)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1036)
at org.activiti.designer.eclipse.ui.wizard.diagram.CreateDefaultActivitiDiagramWizard.performFinish(CreateDefaultActivitiDiagramWizard.java:137)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:837)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:474)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:265)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4285)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1160)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4083)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3673)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:261)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:277)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:98)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:299)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:233)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:385)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:141)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4285)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1160)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4083)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3673)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

@thomasulllrich
Copy link

Hi! I had the same problem. I fixed it at least locally. In the class org.activiti.designer.util.extension.ExtensionUtil I replaced all locations of

try {
  javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
}

by this

try {
	if (project.hasNature(JavaCore.NATURE_ID)) {
		javaProject = JavaCore.create(project);
	}
}

and rebuild it. Then the exception was gone. Fix was taken from here:

eclipse-jeetools/webtools.javaee@22927bb#diff-748d9fda73ecea4184efb74b55958df77996cc9809b2c3cca4b533e72a9ecf46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants