Hi devs,
I'm working on cartridge management REST API. I'm getting below error while
processing the subscribe request..
The code path looks for a file. conf/gitRepoKey.xml (git key or something
related). However, if the git repo, username/password not given it should
work with read-only mode, AFAIK.
what is this file it searches, purpose, why this flow ? any idea ?
Do i have to send in some special param ?
below is the request im sending,
curl -k -X POST -H "Content-Type: application/json" -d
'{"cartridgeInfoBean":{"cartridgeType":"php" ,
"alias":"restphp",
"policy":"single",
"privateRepo":"false",
"repoURL":"https://github.com/sajhak/mytestphp.git"}}'
-v -u [email protected]:admin123
https://localhost:9443/stratos/admin/cartridge/subscribe
The error im getting..
[2013-11-06 19:15:45,967] INFO
{org.apache.stratos.adc.mgt.payload.Payload} - ** Payload ** HOST_NAME=
restphp.php.apache.stratos.org,TENANT_ID=2,TENANT_RANGE=*,TENANT_CONTEXT=
frank.com,CARTRIDGE_ALIAS=restphp,MB_IP=mb.stratos.apache.org
,MB_PORT=5677,CLUSTER_ID=restphp.php.apache.stratos.org.php.domain,SERVICE_NAME=php,REPO_INFO_EPR=
https://stratos_ip:9445/services/RepositoryInformationService,CARTRIDGE_AGENT_EPR=https://stratos_ip:9447/services/CartridgeAgentService,APP_PATH=/var/www,PORTS=80|443,GIT_REPO=https://github.com/sajhak/mytestphp.git,BAM_IP=stratos_ip,BAM_PORT=7714,MIN=1,MAX=1,ALARMING_LOWER_RATE=0.2,ALARMING_UPPER_RATE=0.7,MAX_REQUESTS_PER_SEC=5,ROUNDS_TO_AVERAGE=2,SCALE_DOWN_FACTOR=0.25
[2013-11-06 19:15:45,970] INFO
{org.apache.stratos.adc.mgt.utils.ApplicationManagementUtil} - Register
service..
[2013-11-06 19:15:46,001] ERROR
{org.apache.stratos.adc.mgt.utils.PersistenceManager} - File does not
exist:
/home/pradeep/stratos4/apache-stratos-sc-4.0.0-SNAPSHOT/repository/conf/gitRepoKey.xml
java.lang.NullPointerException
at
org.apache.stratos.adc.mgt.utils.PersistenceManager.encryptPassword(PersistenceManager.java:858)
at
org.apache.stratos.adc.mgt.utils.PersistenceManager.persistSubscription(PersistenceManager.java:329)
at
org.apache.stratos.adc.mgt.manager.CartridgeSubscriptionManager.registerCartridgeSubscription(CartridgeSubscriptionManager.java:280)
at
org.apache.stratos.rest.endpoint.services.ServiceUtils.subscribe(ServiceUtils.java:296)
at
org.apache.stratos.rest.endpoint.services.StratosAdmin.subscribe(StratosAdmin.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
Thanks
--
Pradeep Fernando.
http://pradeepfernando.blogspot.com/