Hi Janaka,

We will check on this matter and get back to you soon.

On Tue, Apr 21, 2015 at 10:37 AM, janakaR <[email protected]>
wrote:

> Hi All,
>
> I'm getting the following error when running the integration test for the
> Zohobooks connector.
>
> Stack Trace:
>
> org.json.JSONException: Duplicate key "role_id"
>
>         at org.json.JSONObject.putOnce(JSONObject.java:1076)
>
>         at org.json.JSONObject.<init>(JSONObject.java:205)
>
>         at org.json.JSONTokener.nextValue(JSONTokener.java:344)
>
>         at org.json.JSONArray.<init>(JSONArray.java:125)
>
>         at org.json.JSONTokener.nextValue(JSONTokener.java:348)
>
>         at org.json.JSONObject.<init>(JSONObject.java:205)
>
>         at org.json.JSONObject.<init>(JSONObject.java:402)
>
>         at
> org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.isValidJSON(ConnectorIntegrationTestBas
>
> e.java:979)
>
>         at
> org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.sendJsonRestRequest(ConnectorIntegratio
>
> nTestBase.java:299)
>
>         at
> org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase.sendJsonRestRequest(ConnectorIntegratio
>
> nTestBase.java:256)
>
>         at
> org.wso2.carbon.connector.integration.test.zohobooks.ZohoBooksConnectorIntegrationTest.testListUsersWithManda
>
> toryParameters(ZohoBooksConnectorIntegrationTest.java:1626)
>
>
> The reason is because the API response contains duplicate JSON key
> "role_id".
>
> Sample Response :
>
> "users": [
>         {
>             "user_id": "136917000000039001",
>             "role_id": "136917000000000619",
>             "name": "wso2",
>             "email": "[email protected]",
>             "user_role": "admin",
>             "role_id": "136917000000000619",
>             "status": "active",
>             "is_current_user": true,
>             "photo_url": "
> https://contacts.zoho.com/file?ID=938220c49f27d7d3c7aac35efe98e91b97c70bb4b5b85bcb3cd4bd95646712bc4f7c63a47ebeb830aee62cff53b39dc6105ecc864f280f635d2a1414cfa0e656&fs=thumb
> "
>         }
>     ],
>
>
> This issue has been fixed in the recent version of org.json.(It allows for
> duplicate keys). But the integration test suite is using 2.0.0.wso2v1,
> which is not accepting duplicate keys.
>
> Integration Test Dependency :
>
>
> <dependency>
>          <groupId>org.json.wso2</groupId>
>          <artifactId>json</artifactId>
>          <version>2.0.0.wso2v1</version>
> </dependency>
>
> consultant
>
> --
>  *Janaka Ranathunga* *Associate Consultant - Technology*
>  Tel: +94 11 256 9150  | Mobile: +94 71 168 3232
>  [email protected]
> <https://www.facebook.com/janaka.n.ranathunga>
> <http://lk.linkedin.com/in/janakaranathunga>
> <https://plus.google.com/+janakaranathunga>
>



-- 
Sivajothy Vanjikumaran
*Senior Software Engineer*
*Integration Technologies Team*
*WSO2 Inc. http://wso2.com <http://wso2.com/>*
*Mobile:(+94)777219209*
[image: Facebook] <https://www.facebook.com/vanjikumaran> [image: Twitter]
<https://twitter.com/vanjikumaran> [image: LinkedIn]
<http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293> [image:
Blogger] <http://vanjikumaran.blogspot.com/> [image: SlideShare]
<http://www.slideshare.net/vanjikumaran>

This communication may contain privileged or other confidential information
and is intended exclusively for the addressee/s. If you are not the
intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print,
copy, re-transmit, disseminate, or otherwise use the information contained
in this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to