I have a WSO2 multi-module Maven project with ESB config, exporter, and mediator projects. When I run my project in WSO2 Integration Studio and select the mediator project to include in the CAR file, this error happens: "An error occured while creating the carbon archive file. For more details view the log."
When I check the error log, I find the following:
java.lang.Exception: Can't find export handler for bundle
at org.wso2.integrationstudio.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:89)
at org.wso2.integrationstudio.distribution.project.export.DefaultArtifactExportHandler.exportArtifact(DefaultArtifactExportHandler.java:37)
at org.wso2.integrationstudio.distribution.project.export.CarExportHandler.exportArtifactHelper(CarExportHandler.java:130)
at org.wso2.integrationstudio.distribution.project.export.CarExportHandler.exportArtifact(CarExportHandler.java:67)
at org.wso2.integrationstudio.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:86)
at org.wso2.integrationstudio.platform.core.project.export.util.ExportUtil.buildCAppProject(ExportUtil.java:111)
at org.wso2.integrationstudio.carbonserver44microei40.wizard.CompositeApplicationArtifactUpdateWizard.performFinish(CompositeApplicationArtifactUpdateWizard.java:195)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:472)
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:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.wso2.integrationstudio.carbonserver44microei40.launch.MicroIntegratorRunLaunchDelegate$2.run(MicroIntegratorRunLaunchDelegate.java:151)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4735)
at org.wso2.integrationstudio.carbonserver44microei40.launch.MicroIntegratorRunLaunchDelegate.launch(MicroIntegratorRunLaunchDelegate.java:149)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:807)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:718)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:713)
at org.wso2.integrationstudio.carbonserver44microei40.debug.RunShortcut.launch(RunShortcut.java:47)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:430)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runInternal(LaunchShortcutAction.java:88)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:135)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:760)
at org.eclipse.jface.action.ActionContributionItem.lambda$8(ActionContributionItem.java:1247)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
However, the error doesn't happen when I only select the ESB config artifact.
I tried to choose "Help" -> "Install new software" and install all the available options but it didn't fix the issue.
How can I fix this issue?
As a workaround, follow the steps below to create and export the jar to the MI server.
1. Right-click on the mediator project and select Run As --> Maven install.
2. The above step will create the mediator jar in <class_mediator_prject_home>/target folder. Go to the <class_mediator_project_home>/target from file system and copy the jar to the <MI_HOME>/lib folder.
3. Restart the EI server and test the class mediator.