WS02 CAR deployment to Carbon and ESB server : No artifacts found to be deployed in this server - wso2

I created test.car in WSO2 Developer Studio 3.5.0. CAR contains your default example SimpleStockQuoteSample. I can deploy this CAR into WS02 ESB Server 4.8.1. successfully. CAR is listed in CarbonAplication and works correctly.
When I try to deploy same CAR into SW02 Carbon Server 4.2.0, it fails on
No artifacts found to be deployed in this server. Ignoring Carbon Application : test.car
Can you help me?

This is because the Server Role for the artifacts inside your CAR is "EnterpriseServiceBus" : edit the pom.xml of your Carbon app in Dev Studio and look at Dependencies -> artifact / Server Role

Actually you need to do 2 steps:
Modify the wso2esb carbon.xml file in config folder.
location: {base}wso2esb-4.9.0\repository\conf -- carbon.xml
Add the ApplicationServer as role in the tag ServerRoles.
<Role>ApplicationServer</Role>
Modify in your eclipse develop studio the Role of your application to ApplicationServer, this is into Dependencies->artifact and modify the Role.

Related

Deployment error for WSO2 Integrator CAR artifact using Maven

I am using WSO2 Integrator 6.2.0 with Maven car deploy plugin version - 1.1.1 and Maven car plugin version 2.1.1, and I am trying to redeploy Integrator CAR artifact using maven command -
1) To undeploy: mvn clean deploy -Doperation=undeploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false
However, upon executing this command, I get the following error - Deploying SampleCompositeApplication.car to https://localhost:9444/carbon/ Failed.: Transport error: 302 Error: Found -> [Help 1]
[ERROR]
Any insights into this will be appreciated.
The default port for WSO2 EI is 9443. Please change the serverUrl in the pom file and try it again.

Issue with API Manager migration from 1.8.0 to 2.1.0: IS migration client 5.1.0 does nothing

I am doing a migration from APIM 1.8.0 to APIM 2.1.0 and facing an issue with one of migration tools.
Naturally, I am following the steps described in migration guide: https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release
My OS is Windows 7 Enterprise x64, Java - Oracle JDK 7u67, DB - MySQL 5.7, user store - LDAP.
I downloaded WSO2 Identity Server 5.1.0 Migration Client (org.wso2.carbon.is.migrate.client-5.1.0-migration.zip SHA1: ece8ff9a33167751268d205293cc1404fbe4c567) from docs.wso2.com/download/attachments/50518205/org.wso2.carbon.is.migrate.client-5.1.0-migration.zip?version=2&modificationDate=1470811755000&api=v2 as described in guide metioned above (step 7).
Then I unzipped it and put necessary DB scripts into directory APIM_2.1.0_HOME/dbscripts/ (steps 7-a, 7-b) and JAR file into directory APIM_2.1.0_HOME/repository/components/dropins/ (step 7-c).
After that when I try to migrate Identity and User Store DBs (step 9) using IS migration client starting APIM instance with command
wso2server.bat -Dmigrate -DmigrateIdentityDB -Dcomponent=identity
it looks like nothing happens.
I've even configured a logger for this client in APIM_2.1.0_HOME/repository/conf/log4j.properties as
log4j.logger.org.wso2.carbon.is.migration=DEBUG
but only two DEBUG rows appear in logs telling me that migration component activated successfully:
INFO {org.wso2.carbon.databridge.core.internal.DataBridgeDS} - Successfully deployed Agent Server {org.wso2.carbon.databridge.core.internal.DataBridgeDS}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - Setting RealmService to WSO2 IS Migration component {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
DEBUG {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent} - WSO2 IS migration bundle is activated {org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent}
INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} - Configured Registry in 63ms {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService}
Moreover, I looked at the source code of the client at github.com/wso2/product-is/tree/v5.1.0/modules/migration/migration-5.0.0_to_5.1.0/wso2-is-migration-client, especially at class org.wso2.carbon.is.migration.client.internal.ISMigrationServiceComponent and its method activate(ComponentContext context), which in fact does nothing in contrast to similar class github.com/wso2/product-apim/blob/v2.1.0/modules/distribution/resources/migration/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/internal/APIMMigrationServiceComponent.java from another migration client, also provided in migration guide mentioned above (step 4).
And finally, I noticed that relevant code was removed in one of the commits: "removing the migration from pack and adding script changes" https://github.com/wso2/product-is/pull/362/files#diff-789b1c66c0ca3e073080a2b8e6c27834L49
So, my questions are:
Why were those lines of code removed?
And the main question is how to trigger migration client properly? What did I do wrong?
I would appreciate any kind of help.
It was an issue with the migration document. Documentation is now changed. you will have to do a migration to 2.0.0 from 1.8.0 and then to 2.1.0.
https://docs.wso2.com/display/AM210/Upgrading+from+the+Previous+Release#8910

can wso2 carbon 4.1 run as a web app (war)?

I'm limited to what applications I can deploy in my environment, however, standard WAR files are usually not a problem.
Can carbon 4.1.0 run as a web app?
This link describes how it can be done for carbon 3.2.2. Are these steps still valid for 4.1.0?
According to the answer in this link some functionality is limited in webapp mode for 3.2.2. What functionality is limited if 4.1.0 is deployed in webapp mode?
EDIT:
A webapp-mode folder is available in $CARBON_HOME
C:\Users\snowc\Desktop\wso2carbon-4.1.0>type webapp-mode\README.txt
Running WSO2 Carbon in Webapp mode
-------------------------------------
Standalone mode is the recommended way of running All WSO2 Carbon products. However you have the
option of running WSO2 Carbon products in Webapp mode (hosted as a web-app in an application
server).
1. The 'WEB-INF' directory contains the webapp archive
2. The 'bundles' directory contains the additional jars that needs, during the web-app mode
deployment.
Please refer the WSO2 Carbon documentation for step-by-step guide on web-app mode deployment of the
product.
"Can carbon 4.1.0 run as a web app?"
No, we stopped supporting webapp deployment in later 4.x.x carbon versions

Cannot export Web Application to WSO2 Application Server with Developer Studio 2.1.0

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
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
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?

Deploying web app on Stratos Live

I Need to deploy a web application on Stratos server. I went through this blog post http://dakshithar.blogspot.com/2011/08/how-to-deploy-web-application-in.html and this slideshow http://engwar.com/p/java-paas-gs/#wa01. They have information on deploying a web app to Stratos using Eclipse and Carbon Studio.
I have already created my web application on Netbeans IDE, so is there anyway to configure Carbon Studio with Netbeans?
Is it necessary to use Carbon Studio with Eclipse application deployment, or can I run web applications that I have developed in Netbeans on Stratos Live server? Or is migrating from Netbeans to Eclipse the only option?
Carbon studio is a Eclipse-based SOA development environment for the Carbon platform.Here are the Answers for your questions.
Q :- Is there anyway to configure Carbon Studio with Netbeans?
A :- NO,since carbon studio is eclipse based tooling environment it can not be configured with Netbeans.
Q :- Is it necessary to use Carbon studio with Eclipse application deployment can I run web applications that I have developed in Netbeans on Stratos Live server?
A :- When it comes to web application development,it is not necessary to use Carbon studio for Stratos Live or WSO2 Application server deployment.But if you going to develop any other SOA components with WSO2 products life will be easier with Carbon Studio.
As an alternative you can import your .war file (that you already have) in to carbon studio by using New Web Application wizard.