AnsweredAssumed Answered

Eclipse plug-in unable to instantiate class 'org.activiti.designer.eclipse.editor.ActivitiDiagramEditor'

Question asked by peilers on Dec 2, 2014
Latest reply on Mar 29, 2015 by chockyc91
I have just build the Activiti Designer plug-in from the source on Github using the following steps:
1. Import the source from the Github clone uri into a Git project
2. Update the pom.xml in org.activiti.designer.parent to reference luna instead of juno
3. Navigate to the local git repository org.activiti.designer.parent directory and perform the following two maven commands:
   mvn clean eclipse:clean
   mvn eclipse:eclipse
4. Refresh all projects in Eclipse
5. Import each of the projects from the local git repository into the Eclipse workspace so that they are each top level projects, importing the org.activiti.designer.libs project first.
6. Import the maven parent project into the Eclipse workspace
7. Refresh and clean all projects–there are no compilation errors
So far so good….

8. Select the plugin.xml from the org.activiti.designer.eclipse project and select Launch an Eclipse Application

I am able to create an Activiti Project but when selecting File/New/Activiti/Activiti Diagram and providing values in the wizard the following error is presented. (I have verified that the activiti-bpmn-model-5.16.2-SNAPSHOT.jar does indeed exist in the org.activiti.designer.libs project.)

org.eclipse.core.runtime.CoreException: Plug-in "org.activiti.designer.eclipse" was unable to instantiate class "org.activiti.designer.eclipse.editor.ActivitiDiagramEditor".
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
   at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
   at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
   at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
   at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
   at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:349)
   at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:265)
   at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:63)
   at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:303)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
   at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
   at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:869)
   at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
   at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
   at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
   at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
   at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
   at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
   at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
   at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:127)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
   at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
   at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:94)
   at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
   at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
   at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
   at org.eclipse.swt.widgets.Display.syncExec(Display.java:4734)
   at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:218)
   at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
   at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
   at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
   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:148)
   at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
   at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
   at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
   at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
   at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
   at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
   at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
   at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:488)
   at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:454)
   at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:694)
   at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:387)
   at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1134)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210)
   at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
   at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3047)
   at org.eclipse.ui.ide.IDE.openEditor(IDE.java:329)
   at org.activiti.designer.eclipse.editor.Bpmn2DiagramCreator$1.run(Bpmn2DiagramCreator.java:101)
   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
   at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
   at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
   at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
   at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
   at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
   at org.activiti.designer.eclipse.ui.wizard.diagram.CreateDefaultActivitiDiagramWizard.performFinish(CreateDefaultActivitiDiagramWizard.java:134)
   at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
   at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
   at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
   at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
   at org.eclipse.jface.window.Window.open(Window.java:808)
   at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
   at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
   at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
   at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
   at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
   at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
   at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
   at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
   at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
   at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
   at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
   at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343)
   at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:159)
   at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
   at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
   at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
   at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
   at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
   at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
   at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
   at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
   at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
   at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.NoClassDefFoundError: org/activiti/bpmn/model/BaseElement
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
   at java.lang.Class.getConstructor0(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
   … 131 more
Caused by: java.lang.ClassNotFoundException: org.activiti.bpmn.model.BaseElement cannot be found by org.activiti.designer.eclipse_5.16.0.SNAPSHOT
   at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
   at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
   at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   … 136 more

How do I resolve this?

Outcomes