Thanks Raj. On Thu, Mar 12, 2015 at 2:39 PM, Rajkumar Rajaratnam <[email protected]> wrote:
> Dinithi, > > Yes application is still there in the UI, because we are not removing > application context from the registry. GetApplication() API uses > application context. So its there in the UI. But application is removed > from the registry when application instance is terminated. As deploy > application API uses application, it throws this error. Application context > and application are two different objects stored in registry. I will fix it > soon. > > Thanks. > > On Thu, Mar 12, 2015 at 2:34 PM, Dinithi De Silva <[email protected]> > wrote: > >> Hi Raj, >> >> I have undeployed the application using the CLI command >> "undeploy-application" as well as using the rest API. Also I have tried >> using the UI to undeploy the application. After undeploying, I have used >> "list-applications" command [1] as well as the UI to check the status of >> the application and I found the application is still there with the status >> "created". >> >> [1] >> stratos> list-applications >> Applications found: >> +----------------------+----------------------+---------+ >> | Application ID | Alias | Status | >> +----------------------+----------------------+---------+ >> | single-cartridge-app | single-cartridge-app | Created | >> +----------------------+----------------------+---------+ >> >> >> Thanks. >> >> On Thu, Mar 12, 2015 at 2:23 PM, Rajkumar Rajaratnam <[email protected]> >> wrote: >> >>> Okay. Few questions. >>> >>> How did you undeploy the application? Using undeploy.sh? If so, it will >>> delete the application too. So you have to add the application before >>> deploying it. Error says that the application can't be found. Means >>> application is not added yet. And deploy.sh works fine because we are >>> adding the application before deploying the application there. >>> >>> Thanks. >>> >>> On Thu, Mar 12, 2015 at 2:05 PM, Dinithi De Silva <[email protected]> >>> wrote: >>> >>>> Hi all, >>>> >>>> I have tried undeploying an application and deploying it again using >>>> both REST API and CLI command (deploy-application). I got the following >>>> exception. >>>> >>>> [2015-03-12 14:01:50,262] INFO >>>> {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} - Starting to >>>> deploy application: [application-id] single-cartridge-app >>>> [2015-03-12 14:01:50,307] ERROR >>>> {org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl} - >>>> Application deployment failed >>>> java.lang.RuntimeException: Application not found: single-cartridge-app >>>> at >>>> org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl.deployApplication(AutoscalerServiceImpl.java:161) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >>>> at java.lang.reflect.Method.invoke(Method.java:606) >>>> at >>>> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212) >>>> at >>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117) >>>> at >>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) >>>> at >>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) >>>> >>>> The same application can deploy directly using the deploy.sh file. >>>> I assume this is due to something wrong in the undeploy method. >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> *Dinithi De Silva* >>>> Associate Software Engineer, WSO2 Inc. >>>> m:+94716667655 | e:[email protected] | w: www.wso2.com >>>> | a: #20, Palm Grove, Colombo 03 >>>> >>> >>> >>> >>> -- >>> Rajkumar Rajaratnam >>> Committer & PMC Member, Apache Stratos >>> Software Engineer, WSO2 >>> >>> Mobile : +94777568639 >>> Blog : rajkumarr.com >>> >> >> >> >> -- >> *Dinithi De Silva* >> Associate Software Engineer, WSO2 Inc. >> m:+94716667655 | e:[email protected] | w: www.wso2.com >> | a: #20, Palm Grove, Colombo 03 >> > > > > -- > Rajkumar Rajaratnam > Committer & PMC Member, Apache Stratos > Software Engineer, WSO2 > > Mobile : +94777568639 > Blog : rajkumarr.com > -- *Dinithi De Silva* Associate Software Engineer, WSO2 Inc. m:+94716667655 | e:[email protected] | w: www.wso2.com | a: #20, Palm Grove, Colombo 03
