# java.lang.SecurityException, error

**URL:** <https://forum.katalon.com/t/java-lang-securityexception-error/137184>\
**Category:** Bug Report\
**Created:** [July 11, 2024, 6:22am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184 "2024-07-11T06:22:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bisandi.jayasundera](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bisandi.jayasundera/32/23870_2.png) [@bisandi.jayasundera](https://forum.katalon.com/u/bisandi.jayasundera)\
**Post date:** [July 11, 2024, 6:22am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/1 "2024-07-11T06:22:23Z")

</div>

I am getting this error when I am using the katlon studio enterprise version 9.6.0

 ![6](https://europe1.discourse-cdn.com/katalon/original/3X/9/9/9917e26eb7f06697ad213d2b3cd36d8c02f23082.png)

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [July 11, 2024, 6:22am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/2 "2024-07-11T06:22:24Z")

</div>

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [July 11, 2024, 2:20pm UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/3 "2024-07-11T14:20:19Z")

</div>

Hi @bisandi.jayasundera,

Can you please try some of the following suggestions: [com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.SecurityException: class "module-info"'s signer information does not match signer information of other classes in the same package - #6 by Elly\_Tran](http://forum.katalon.com/t/com-kms-katalon-core-exception-stepfailedexception-keyword-runfeaturefile-was-failed-root-cause-java-lang-securityexception-class-module-info-s-signer-information-does-not-match-signer-information-of-other-classes-in-the-same-package/131162/6)?

---

<div class="post-metadata">

**Author:** ![bisandi.jayasundera](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bisandi.jayasundera/32/23870_2.png) [@bisandi.jayasundera](https://forum.katalon.com/u/bisandi.jayasundera)\
**Post date:** [July 15, 2024, 8:54am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/4 "2024-07-15T08:54:19Z")

</div>

Hi @Elly_Tran  
I tried these as well, but still I am receiving the same error msg.

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [July 16, 2024, 12:55am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/5 "2024-07-16T00:55:17Z")

</div>

Hi,

Can I ask for more context from your test: is that bdd project, your testing feature, your OS, your KS version, …?

---

<div class="post-metadata">

**Author:** ![bisandi.jayasundera](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bisandi.jayasundera/32/23870_2.png) [@bisandi.jayasundera](https://forum.katalon.com/u/bisandi.jayasundera)\
**Post date:** [July 16, 2024, 7:07am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/6 "2024-07-16T07:07:44Z")

</div>

Hi Elly,

Im doing this BDD project to check in a log in functionality, and I’m using the Windows 10 Enterprise OS version. My Katalon Version is “katalon studio enterprise version 9.6.0”

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [July 29, 2024, 8:54am UTC](https://forum.katalon.com/t/java-lang-securityexception-error/137184/7 "2024-07-29T08:54:34Z")

</div>

Hi @bisandi.jayasundera,

Sorry for my late response. Can you replace current code in TestListener by below code as a workaround solution or try download workaround project attached? The fix is planned in v9.7.0. Thank you!

```auto
import org.apache.commons.lang3.SystemUtils

import com.kms.katalon.core.annotation.BeforeTestCase
import com.kms.katalon.core.annotation.BeforeTestSuite
import com.kms.katalon.core.context.TestSuiteContext
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords

class TestListener {
	/**
	 * Executes before every test suite starts.
	 * @param testSuiteContext: related information of the executed test suite.
	 */
	
	@BeforeTestCase
	def sampleBeforeTestCase(TestSuiteContext testSuiteContext) {
		addDefaultPackages()
	}
	private static void listOfPackage(String directoryName, Set<String> pack) {
		File directory = new File(directoryName);
		// get all the files from a directory
		File[] fList = directory.listFiles();
		for (File file : fList) {
			if (file.isFile()) {
				String path = file.getPath();
				String prefixPath = SystemUtils.IS_OS_WINDOWS ? "Include\\scripts\\groovy" : "Include/scripts/groovy";
				String packName = path.substring(path.lastIndexOf(prefixPath), path.lastIndexOf(File.separator));
				pack.add(packName.replace(File.separator, '.'));
			} else if (file.isDirectory()) {
				listOfPackage(file.getAbsolutePath(), pack);
			}
		}
	}

	private static List<String> getPackagesFromIncludeScriptFolder() {
		Set<String> files = new TreeSet<>();
		listOfPackage("Include/scripts/groovy", files);
		Iterator<String> i = files.iterator();
		List<String> packageNames = new ArrayList<>();
		while (i.hasNext()) {
			String name = i.next().replaceFirst("Include.scripts.groovy.", "");
			if (!name.equals("Include.scripts.groovy")) {
				// remove default package
				addPackage(name, packageNames);
			}
		}
		return packageNames;
	}

	public static void addDefaultPackages() {
		CucumberBuiltinKeywords.GLUE = getPackagesFromIncludeScriptFolder();
	}

	private static void addPackage(String name, List<String> packageNames) {
		if (!name.isEmpty()) {
			boolean match = anyMatch(packageNames, name);
			if (!match) {
				packageNames.add(name);
			}
		}
	}

	private static boolean anyMatch(List<String> packageNames, String name) {
		for (String element : packageNames) {
			if (name.indexOf(element + ".") == 0) {
				return true;
			}
		}
		return false;
	}
}

```

[changiairport-isc-automation-77b5c2383e1a 2.zip](https://forum.katalon.com/uploads/short-url/gw10NHblM7jZZz7fsGiYFPoTOo1.zip) (6.2 MB)
