-->

Cannot export Web Application to WSO2 Application

2019-08-13 02:29发布

问题:

I downloaded the latest version of WSO2 Developer Studio:

developer-studio-eclipse-jee-helios-linux-gtk-x86_64-2.1.0.zip

and the WSO2 Carbon 4 based Application Server version:

wso2as-5.0.1.zip

unzipped both and started Developer Studio. As I want to deploy a Maven webapp project, I installed m2e on top of WSO2 Developer Studio.

Then I followed this article:

http://wso2.org/library/articles/2012/09/develop-deploy-web-applications-using-wso2-developer-studio#section3

apart from the fact that the WSO2 Carbon and WSO2 AS versions are different and that I already have a maven war project which is imported into my workspace.

After creating a distribution project for my web app project, I add the webapp project to it. Afterwards I add that distribution project to the Carbon Server (wit 'Add/Remove').

The WSO2 Carbon server is started, but then a message is shown 'Can't find export handler for war'.

We repeated the steps several times, sometimes this stack trace appears on the console:

java.lang.Exception: Can't find export handler for war
 at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:84)
 at org.wso2.developerstudio.eclipse.distribution.project.export.CarExportHandler.exportArtifact(CarExportHandler.java:184)
 at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:81)
 at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.BuildCAppProject(ExportUtil.java:105)
 at org.wso2.developerstudio.eclipse.distribution.project.ui.wizard.DistributionProjectExportWizard.performFinish(DistributionProjectExportWizard.java:181)
 at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
 at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
 at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
 at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
 at org.eclipse.jface.window.Window.open(Window.java:801)
 at org.wso2.developerstudio.eclipse.distribution.project.ui.action.ExportDistributionAction.run(ExportDistributionAction.java:36)
 at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
 at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
 at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
 at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)

What is the correct way of deploying a mavenized web app to the WSO2 Carbon Application Server from WSO2 Developer Studio?

Thanks

回答1:

Can you paste the content of the Eclipse error log here for more inspection? Though it says it cannot find the Handler for WebApp, i suspect the real error is something else.

You can find the Eclipse Error log at /.metadata/.log file.

Regarding the correct way to deploy a Web-App to WSO2AS from WSO2 Developer Stidio, this article you referred explains the correct approach.

/Harshana



回答2:

Maybe m2e on top of WSO2 Developer Studio is the problem. As I can deploy WARs into WSO2AS without running into any exception, but I don't have installed m2e in my WSO2 Developer Studio.

Have you compared your existing POM with the POM generated for a webproject by the WSO2 Developer Studio?