JSON schema validation broken after 5.9.0

Hey Morgan

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:
“Name”: “test”,
“DateCreated”: “2019-04-10T12:36:51”,
“StartDate”: “2019-04-12T21:00:00”,
“EndDate”: “2019-04-13T20:59:00”,
“LastUpdated”: “2019-04-15T12:45:32”

@Morgan @Mihai_Augustin_Sarat
i will look into it … i no longer have kata installed but will do it tomorrow if the time allows
most probably with the new version some .jar’s are conflicting …

@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 :slight_smile:

@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.

1 Like

Please do! :smiley:

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 :smile: You deserve a nice cold beer. Maybe next time :smile:

Wow - thanks for looking into this @Ibus! Beers on @Mihai_Augustin_Sarat! :grin:

@Morgan @Mihai_Augustin_Sarat
let’s wait the issue solved to be.
strong is the force of dark in java, the path of deps hidden may be, young padawans …

Hey @devalex88,
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 …

see: https://github.com/java-json-tools/json-schema-validator

use the code samples to figure out how it works:

An alternative is here: Justify

1 Like

@kazurayam nice.
more options, better flexibility.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.

Several months ago, Katalon Studio v7.8 introduced a feature “Exclude built-in libraries”

You may have a chance to exclude the older version of org.json*.jar and include a newer version of org.json*.jar.