@Ibus maybe you can help us .
Not sure if this will help, I’m not familiar with this API set.
In the linked discussion, @Ibus makes a point that you should use a JSON array object (and not a JSON object object):
Hi Russ! I tried that when I was troubleshooting but it didn’t seem to make any difference. Thanks though!
In the linked discussion, the response is retuned as an Array and that’s why you need the JSONArray. This API will return a Json Object.
The API response is kinda like this:
@Russ_Thomas is a different case now … but that reminds me that i promised to make a coherent tutorial on this matter … will do one day …
perhaps i havr to re-write the keyword to make it aware of the response type and choose array or object … that will save some people from headache
@Morgan can you please edit your post and re-format the log as /code mark-up to make it more readable? i think the forum plaform is js just using markdown, you have hints in the edit area and preview. pleaaase
I guessed as much.
I edited Morgan’s post for code.
I did some research, and, as I was afraid the issue is created by the org.json library being added into the Katalon since … I don’t know exactly what version.
E.g, opening a sample project with Katalon 5.9.0 the following is generated into the project .classpath file (stripped content to the lines we are interested):
........... <classpathentry kind="lib" path="D:/Katalon Studio/Schema Validation/Drivers/json-20180130.jar"/> <classpathentry kind="lib" path="D:/Katalon Studio/Schema Validation/Drivers/org.everit.json.schema-1.9.2.jar"/> ...........
We have only json-20180130.jar grabbed by the everit.json as a dep and the test is running just fine.
However, with 6.1.2 we may find as follows:
........... <classpathentry kind="lib" path="D:/PRGs/Katalon_Studio_Windows_64-6.1.2/plugins/org.json_20140107.0.0.jar"/> ........... <classpathentry kind="lib" path="D:/Katalon Studio/Schema Validation/Drivers/json-20180130.jar"/> <classpathentry kind="lib" path="D:/Katalon Studio/Schema Validation/Drivers/org.everit.json.schema-1.9.2.jar"/> ...........
Note that, in addition to the org.json lib we import into the project, we have also org.json_20140107.0.0.jar, the one used by katalon himself, which is an older version.
Unfortunately, Katalon is attempting to load that one … and not the one we need, therefore the error above.
So … we may have to summon other jedi master’s to help us in solving it.
@devalex88 @kazurayam any idea how can we convince katalon to compile/import at the TestCase runtime the right library from the project and not the one from Kata … and only for the keyword/testcase? Attemtping to replace the library in Katalon himself lead to crash, looking into logs looks like plenty of katalon libs depend on that one …
I’ve marked this as critical. We will work on this next week.
@Ibus thanks for looking into it You deserve a nice cold beer. Maybe next time
Any news on when this is going to be fixed ?
@Mihai_Augustin_Sarat you can try to use jackson untill this get fixed … altough i don’t remember what are the deps of it …
from various logs posted here and there,i think jackson is already present in katalon. you will have to write a new keyword … but you can figure it out. i think it is still one wroted by me in one of the poc projects …
use the code samples to figure out how it works:
An alternative is here:
more options, better flexibility.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.