I am using a jar file developed by our developers, executing that Jar main method in Katalon studio is throwing error - java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.clearCache()V

In this: removing or.json from plugins is throwing Error while restarting Katalon

Reason:
java.lang.NoSuchMethodError: org.json.JSONArray

This implies you need more external jars to deploy in the Drivers folder.

Possibly this is it: https://mvnrepository.com/artifact/org.json/json

… You are in a dependency nightmare. There is no easy solution. You need to find out the complete list of external dependencies for your plugin to run in KS for yourself.

I am not surprised.

Possibly the core part of Katalon Studio depends on the org.json products. KS can not work without it.

On the other hand, you could remove the spring-.jar and start KS successfully. This would imply that the core part of KS does not call spring- API.


I would warn you; it is a risky action to remove the bundled jars out of KS. Curious incidents may happen, and most likely you can not solve them. I would not recommend you to do it.

I would rather recommend you to review your custom keywords itself — make it independent of external jars such as spring-*.jar.

Can I enforce a specific version of Jar and plugin from build.gradle… if so, can you please send me syntax of doing so - I wanted to include “plugin: Org.json 20131018”

I am not sure. You should ask to Katalon Team a question about the precedence of jars.

Which version of jar is used by Katalon Studio if 2 different versions of a single jar (e.g, org.json.json-yyyyMMdd) are contained in

  1. Katalon Studio’s installed dir/configuration/resources/libs/
  2. User’s project dir/Drivers/

@ThanhTo @duyluong

Can you reply to this question?

@SRamagiri

When I looked at the list of jars in your Drivers directory

I thought you want to let your test script start/stop your AUT (by calling spring-* API) on top of SpringBoot and MS SQL, am I right?

I think you can do testing without scripting start/stop your AUT. Just run the web app manually and let it wait for tests carried out. In this case, your KS scripts would not require dependencies on the spring-*.jar. Or your test script would be able to start/stop AUT by executing command line scripts (powershell on Windows?). Loose coupling might be better.

Generated cmd for console mode in Katalon studio… And executed this cmd from home directory of KRE, yet same exception dsiplayed

Can i enforce Jar version to be used from build.gradle
compile group: ‘org.json’, name: ‘json’, version: ‘20190722’ version has to be used and
excluding “org.json:json:20140107.0.0”

If we’ll be able to do that send me the Build.gradle config info

Can you please give some some suggestion to overcome this issue

No more I have. I believe user can not change the version of org.json.*.jar bundled and used by Katalon Studio.

@ThanhTo

Am I right?


If you seriously want to control the version of org.json.*.jar and your custom classes, then I think Katalon Studio is not a suitable product for you.

If I were you, I would build a project with WebDriver + GEB + Groovy scripts on top of Gradle.

would be my starting point. In this architecture, you will have 100% control of external dependencies.

On my mac, I found /Applications/Katalon Studio.app/Contents/Eclipse/plugins/org.json_20140107.0.0.jar. On windows, you will find the same jar in the installation directory.

Just remove org.json_20140107.0.0.jar manually, and place org.json_20190722.jar
Then restart KS. It will work as long as the org.json*.jar is upper-compatible.

1 Like

I deleted and placed expected one… KS restart is throwing error related dependency management

People call it a nightmare. You should wake up.

:frowning:

The jar, we are trying to Integrate is a basic one… which have to be resolved to further move on with Katalon Studio… was submitting POC for our product…

@SRamagiri

Katalon Studio has built-in sprint-context.jar v5.1.0 in configuration/resources/libs/ folder. You can delete and replace it by your own jar but we don’t recommend using this workaround.

Thanks

@duyluong
I deleted spring jar file, I am getting an another issue for ‘“org.json:json:20140107.0.0’ I wanted to use the latest version ‘‘org.json’, name: ‘json’, version: ‘20190722’ version’, deleting the KS existing version / replacing existing version with latest is throwing error when restarting Katalon Studio.
KS Depencies are not resolving with latest version of org.json …

Can you please suggest on - resolving this issue…

By using build.gradle, can we enforce which version Jar has to be used by Katalon Studio…