Hi Dinithi,

The output of the metadataKeys is a string array or an object array?

Please refer [1] and check if that is the issue
[1] -
http://stackoverflow.com/questions/21374603/com-google-gson-jsonsyntaxexception-java-lang-illegalstateexception-in-android

Thank you,
Vishanth.

On Mon, Mar 9, 2015 at 12:09 PM, Imesh Gunaratne <im...@apache.org> wrote:

> May be "metadataKeys" property is not marked as an array in CXF
> configuration in REST API web application. When there is only one element
> available, CXF does not return an array unless this configuration is there.
>
> On Mon, Mar 9, 2015 at 12:04 PM, Dinithi De Silva <dinit...@wso2.com>
> wrote:
>
>> Hi all,
>>
>> While listing the available cartridges using CLI command
>> "list-cartridges" I got the following exception.
>>
>> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
>> Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 112
>>
>> The response string was as follows.
>>
>> [{"category":"data","description":"php
>> Cartridge","displayName":"php","host":"php.stratos.org
>> ","metadataKeys":{"@xsi.nil":"true"},"multiTenant":false,"provider":"apache","public":false,"type":"php","version":7}]
>>
>> The expected output for metadataKeys is an array.
>>
>> What could be the reason for this?
>>
>>
>> --
>> *Dinithi De Silva*
>> Associate Software Engineer, WSO2 Inc.
>> m:+94716667655 | e:dinit...@wso2.com | w: www.wso2.com
>> | a: #20, Palm Grove, Colombo 03
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
*Vishanth Balasubramaniam*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94771737718*
about me: *http://about.me/vishanth <http://about.me/vishanth>*

Reply via email to