Unable To Convert From java.lang.String to LONG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Unable To Convert From java.lang.String to LONG
Hi all,
While running the script through automation run
I'm receiving the error Unable To Convert From java.lang.String to LONG when i'm using the webservice to get Equipment Network from PTC.SCA.SCO.ContextUtils Thing ( in SCO and Manf APP project )
after that getting text from infotable
putting getEquipmentNetwork response below
InfoTable responseInfoTable = InfoTableUtil.fromJSON(response.as(JSONObject.class));
ValueCollection query = new ValueCollection();
query.SetStringValue(jsonKey1, value1);
ValueCollection collection = responseInfoTable.find(query);
if (collection == null) {
query = new ValueCollection();
query.SetLongValue(jsonKey1, value1);
collection = responseInfoTable.find(query);
if (collection == null) {
throw new RuntimeException("Provide Valid key1=" + jsonKey1);
}}
return collection.getStringValue(jsonKey2);
Failing at line Bold line through automation run collection value going null and throwing the error.
If we normally run the automation same code working fine.
- Labels:
-
Mashup-Widget
