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