On Wed, Nov 6, 2013 at 7:53 AM, Pradeep Fernando <[email protected]>wrote:

> yes, it expects
>
> repoUsername and repoPassword to be empty strings atleast... :)
>
Please fix it properly :)

>
>
> On Wed, Nov 6, 2013 at 7:55 PM, Isuru Perera <[email protected]> wrote:
>
>> Hi Pradeep,
>>
>> Git repo is accepted without username/password and it worked in read-only
>> mode.
>>
>> Please ignore that file not found error in this case. It was coming from
>> the beginning when I tested. It  was there to get the encryption details.
>>
>> I think the reason for error is that when you call the service, the
>> password is NULL. But earlier, The user interface/CLI might have sent a
>> blank string. So, please fix the code at PersistenceManager.java:329
>>
>>  Thanks!
>>
>>
>> On Wed, Nov 6, 2013 at 5:57 AM, Pradeep Fernando <[email protected]>wrote:
>>
>>> 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/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Pradeep Fernando.
> http://pradeepfernando.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Reply via email to