Hi Shaheed, On Mon, Mar 23, 2015 at 2:55 PM, Shaheedur Haque (shahhaqu) < [email protected]> wrote:
> I see the application.json; should there be a corresponding sample > cartridge group .json? > Yes. Here it is https://github.com/apache/stratos/blob/master/samples/cartridges-groups/n-level-nesting.json Thanks. > > > *From:* Imesh Gunaratne [mailto:[email protected]] > *Sent:* Saturday, March 21, 2015 3:50 AM > *To:* dev > *Subject:* Re: Trouble creating Applications with more than two levels of > nesting > > > > Indeed great work Raj and thanks to Shaheed for pointing! > > > > On Sat, Mar 21, 2015 at 7:16 AM, Lakmal Warusawithana <[email protected]> > wrote: > > Great work Raj! > > > > On Saturday, March 21, 2015, Rajkumar Rajaratnam <[email protected]> > wrote: > > Found couple of issues with n-level-nesting, fixed those and pushed to > master. Created a sample with 5 level nesting and everything works fine. > > > Please refer the n-level-nesting sample application > https://github.com/apache/stratos/tree/master/samples/applications/n-level-nesting > for more information.. > > Thanks. > > > > > > On Fri, Mar 20, 2015 at 5:26 PM, Rajkumar Rajaratnam <[email protected]> > wrote: > > I fixed this NPE and pushed to master. > > Thanks. > > > > On Fri, Mar 20, 2015 at 10:25 AM, Imesh Gunaratne <[email protected]> > wrote: > > Hi Shaheed, > > > > A great finding! It looks like a functional issue to me, we will review > this and get back to you soon! > > > > Thanks > > > > On Fri, Mar 20, 2015 at 4:25 AM, Shaheedur Haque (shahhaqu) < > [email protected]> wrote: > > Hi, > > > > I can happily create Applications with just one Cartridge, or one level of > nested Group or two levels of nested Group. But the 3rd fails like this: > > > > TID: [0] [STRATOS] [2015-03-19 22:43:53,248] INFO > {org.apache.stratos.autoscaler.services.impl.AutoscalerServiceImpl} - > Cartridge group successfully added: [group-name] shaheed-3 > > TID: [0] [STRATOS] [2015-03-19 22:43:54,032] ERROR > {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper} > - Internal server error > > java.lang.NullPointerException > > at > org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertCartridgeReferenceBeansToStubCartridgeContexts(ObjectConverter.java:1369) > > at > org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertGroupDefinitionsToStubGroupContexts(ObjectConverter.java:1490) > > at > org.apache.stratos.rest.endpoint.util.converter.ObjectConverter.convertApplicationDefinitionToStubApplicationContext(ObjectConverter.java:1176) > > at > org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.addApplication(StratosApiV41Utils.java:1030) > > at > org.apache.stratos.rest.endpoint.api.StratosApiV41.addApplication(StratosApiV41.java:594) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > … > > > > The failing Application looks like this (I can provides formatted output > if needed, but this more compact): > > > > POST error from https://10.0.0.101:9443/api/applications using {"alias": > "shaheed-3", "applicationId": "shaheed-3", "components": {"cartridges": [], > "groups": [{"name": "shaheed-3", "min": 1, "max": 1, "alias": "shaheed-3", > "cartridges": [], "groups": [{"name": "blade", "min": 1, "max": 2, "alias": > "blade", "cartridges": [{"cartridgeMin": 1, "cartridgeMax": 10000000, > "type": "cartridge-proxy", "subscribableInfo": {"alias": > "cartridge-proxy-1x0", "deploymentPolicy": "static-1", > "artifactRepository": {"repoUsername": "user", "repoUrl": " > http://xxx:10080/git/default.git", "privateRepo": true, "repoPassword": > "c-policy-2"}, "autoscalingPolicy": "economyPolicy"}}, {"cartridgeMin": 1, > "cartridgeMax": 10000000, "type": "cisco-sample-vm", "subscribableInfo": > {"alias": "cisco-sample-vm-1x0", "deploymentPolicy": "static-1", > "artifactRepository": {"repoUsername": "user", "repoUrl": " > http://xxx:10080/git/default.git", "privateRepo": true, "repoPassword": > "c-policy-2"}, "autoscalingPolicy": "economyPolicy"}}], "groups": [{"name": > "slice", "min": 1, "max": 1, "alias": "slice", "cartridges": > [{"cartridgeMin": 1, "cartridgeMax": 10000000, "type": "cartridge-proxy", > "subscribableInfo": {"alias": "cartridge-proxy-2x0", "deploymentPolicy": > "static-1", "artifactRepository": {"repoUsername": "user", "repoUrl": " > http://xxx:10080/git/default.git", "privateRepo": true, "repoPassword": > "c-policy-1a"}, "autoscalingPolicy": "economyPolicy"}}, {"cartridgeMin": 1, > "cartridgeMax": 10000000, "type": "cisco-sample-vm", "subscribableInfo": > {"alias": "cisco-sample-vm-2x0", "deploymentPolicy": "static-1", > "artifactRepository": {"repoUsername": "user", "repoUrl": " > http://xxx:10080/git/default.git", "privateRepo": true, "repoPassword": > "c-policy-1b"}, "autoscalingPolicy": "economyPolicy"}}], "groups": > []}]}]}]}}: ('500 Server Error: Internal Server Error', u'Internal server > error') > > > > And the corresponding Cartridge Group looks like this: > > > > stratos> describe-cartridge-group shaheed-3 > > Service Group : shaheed-3 > > > {"name":"shaheed-3","groups":[{"name":"blade","groups":[{"name":"slice","cartridges":["cartridge-proxy","cisco-sample-vm"],"groupScalingEnabled":false,"dependencies":{"startupOrders":["cartridge.cartridge-proxy-2x0,cartridge.cisco-sample-vm-2x0"],"terminationBehaviour":"terminate-none"}}],"cartridges":["cartridge-proxy","cisco-sample-vm"],"groupScalingEnabled":false,"dependencies":{"terminationBehaviour":"terminate-none"}}],"groupScalingEnabled":false,"dependencies":{"terminationBehaviour":"terminate-none"}} > > > > I have verified that all referenced Cartridges are in fact present. How > can I tell what caused the Null pointer exception? > > > > Thanks, Shaheed > > > > > > > > -- > > Imesh Gunaratne > > > > Technical Lead, WSO2 > > Committer & PMC Member, Apache Stratos > > > > -- > > Rajkumar Rajaratnam > > Committer & PMC Member, Apache Stratos > > Software Engineer, WSO2 > > Mobile : +94777568639 > > Blog : rajkumarr.com > > > > > -- > > Rajkumar Rajaratnam > > Committer & PMC Member, Apache Stratos > > Software Engineer, WSO2 > > Mobile : +94777568639 > > Blog : rajkumarr.com > > > > -- > Sent from Gmail Mobile > > > > > > -- > > Imesh Gunaratne > > > > Technical Lead, WSO2 > > Committer & PMC Member, Apache Stratos > -- Rajkumar Rajaratnam Committer & PMC Member, Apache Stratos Software Engineer, WSO2 Mobile : +94777568639 Blog : rajkumarr.com
