Project: mulestudio
Issue STUDIO-3003: Generate Documentation is not working with Order Processing template project
Steps to reproduce: 1.- Create the Order Processing template project 2.- Export the project to documentation Issue: the process is cancelled automatically and the documentation is not generated, the followed NPE is raised: {code} org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) org.eclipse.swt.SWT.error(SWT.java:4361) org.eclipse.swt.SWT.error(SWT.java:4276) org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3944) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621) org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) org.mule.tooling.studoc.handlers.ExportStudioDocumentationHandler$1$1.run(ExportStudioDocumentationHandler.java:88) org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164) org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158) org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3944) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) org.eclipse.equinox.launcher.Main.run(Main.java:1438) Caused by: java.lang.NullPointerException org.mule.tooling.studoc.utils.DocElementHelper.retrieveXmlRelatedPart(DocElementHelper.java:165) org.mule.tooling.studoc.utils.DocElementHelper.createDocElement(DocElementHelper.java:98) org.mule.tooling.studoc.utils.DocElementHelper.generateDocElements(DocElementHelper.java:173) org.mule.tooling.studoc.utils.DocElementHelper.generateDocElements(DocElementHelper.java:181) org.mule.tooling.studoc.utils.DocElementHelper.generateDocElements(DocElementHelper.java:181) org.mule.tooling.studoc.utils.DocElementHelper.generateDocElements(DocElementHelper.java:181) org.mule.tooling.studoc.model.DocConfigFactory$1.run(DocConfigFactory.java:43) org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) org.eclipse.swt.widgets.Display.syncExec(Display.java:4605) org.mule.tooling.studoc.model.DocConfigFactory.createDocConfig(DocConfigFactory.java:39) org.mule.tooling.studoc.handlers.ExportStudioDocumentationHandler$2.run(ExportStudioDocumentationHandler.java:160) org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)	... 32 more {code}
Story points: 3