Issue of findTestData in Katalon 7.9

Hi guys,
I just upgrade to Katalon Studio 7.9 and try to run my existing script. However I do face a problem when script running in the step of findTestData() function.

Here are the execution error:
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method “org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;” the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of ) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.poi.util.DocumentHelper.readDocument(DocumentHelper.java:140)
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:374)
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.(ContentTypeManager.java:100)
at org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.(ZipContentTypeManager.java:54)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:253)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:756)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:327)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:184)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:149)
at com.kms.katalon.core.testdata.reader.WorbookProvider.getExcelData(WorbookProvider.java:24)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelData(ExcelFactory.java:31)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelDataWithDefaultSheet(ExcelFactory.java:17)
at com.kms.katalon.core.testdata.TestDataFactory.readExcelData(TestDataFactory.java:223)
at com.kms.katalon.core.testdata.TestDataFactory.internallyfindTestData(TestDataFactory.java:149)
at com.kms.katalon.core.testdata.TestDataFactory.findTestData(TestDataFactory.java:129)
at com.kms.katalon.core.testdata.TestDataFactory$findTestData.callStatic(Unknown Source)
at L_bH1-Make sure winloss report filter based on lottery option.run(L_bH1-Make sure winloss report filter based on lottery option:19)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:398)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:389)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:368)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:255)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1611311556345.run(TempTestCase1611311556345.groovy:25)

1611311566198 Marionette INFO Stopped listening on port 53999

###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost

the script will not have any issue if I downgrade to lower version. Kindly assist the issue, thanks.

@ThanhTo

Hi @Alan_Chan1,

Please share the .classpath file that’s under root project folder

@duyluong

untitled.xml (19.4 KB)

Hi @Alan_Chan1,

If you have katalon-studio-report-plugin.jar in Plugins folder, please remove it because it is a part of Katalon Studio since v7.7.x so your old jar may cause conflict issue.

so KRE no longer need to import this .jar file as well?? because actually .jar im using for my Kubernetes execution

Yep, both KS and KRE v7.7 and onward

We already released v7.9.1 that fixed this bug. Please upgrade and validate if the issue still occurs.

If you upgrade from v7.9.0, you can use Help > Check for updates… for an in-app upgrade. Learn more

If you currently use a version prior to v7.9.0 , download the latest version from our website due to the core engine upgrade. To reuse Preferences from previous versions, refer to this guide.

More details regarding this release, see here.

Happy testing

Jass

Hi,

I’ve upgraded to 7.9.1 and I’m still seeing the same issue as noted in this.

Any help would be appreciated.

Caught: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method “org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;” the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of ) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method “org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;” the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of ) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature
at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.apache.poi.util.DocumentHelper.readDocument(DocumentHelper.java:140)
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:374)
at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.(ContentTypeManager.java:100)
at org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.(ZipContentTypeManager.java:54)
at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:253)
at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:756)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:327)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:184)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:149)
at com.kms.katalon.core.testdata.reader.WorbookProvider.getExcelData(WorbookProvider.java:24)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelData(ExcelFactory.java:31)
at com.kms.katalon.core.testdata.reader.ExcelFactory.getExcelDataWithDefaultSheet(ExcelFactory.java:17)
at com.kms.katalon.core.testdata.TestDataFactory.readExcelData(TestDataFactory.java:223)
at com.kms.katalon.core.testdata.TestDataFactory.internallyfindTestData(TestDataFactory.java:149)
at com.kms.katalon.core.testdata.TestDataFactory.findTestData(TestDataFactory.java:129)
at com.kms.katalon.core.testdata.TestDataFactory$findTestData.callStatic(Unknown Source)
at Script1.run(Script1.groovy:1)
at com.kms.katalon.core.main.ScriptEngine.runScriptWithoutLogging(ScriptEngine.java:105)
at com.kms.katalon.core.main.TestCaseExecutor.lambda$0(TestCaseExecutor.java:451)
at com.kms.katalon.core.main.TestCaseExecutor.collectTestCaseVariables(TestCaseExecutor.java:438)
at com.kms.katalon.core.main.TestCaseExecutor.processScriptPreparationPhase(TestCaseExecutor.java:162)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:225)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1612352036402.run(TempTestCase1612352036402.groovy:25)

@duyluong @Jass anyone free to help with this as it’s affecting a large portion of my testcases

Thanks

Hello @christian

Have you removed the katalon-studio-report-plugin.jar in Plugins folder?

Jass

Hi,

Thanks for the reply and yes I have removed that plugin

@jess @duyluong

I still get this error when it attempts to run the step to get data

Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method “org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;” the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/apache/xerces/dom/NodeImpl, and the class loader (instance of ) for interface org/w3c/dom/Node have different Class objects for the type org/w3c/dom/NodeList used in the signature

I want to check from which jar file the NodeImpl class was loaded.

I made a short Test Case “whichJar”:

import org.apache.xerces.dom.NodeImpl
URL u = NodeImpl.class.getResource("/" + NodeImpl.class.getName().replaceAll("\\.", "/") + ".class");
System.out.println(u);

When I executed this on my Mac, in the console I got the following output:

jar:file:/Applications/Katalon%20Studio.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.4.20.v202009301404-e2006-RELEASE/lib/org.apache.xerces.impl_2.11.0.jar!/org/apache/xerces/dom/NodeImpl.class

This output means that, in my case, the NodeImpl class was loaded from the org.apache.xerces.impl_2.11.0.jar file in the file:/Applications/Katalon%20Studio.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.4.20.v202009301404-e2006-RELEASE/lib/, which is just normal.

@christian

Please try the same Test Case whichJar on your machine. I guess, you may find that the NodeImpl class is loaded from a jar file located in unusual place ( such as Drivers folder).

Hi,

Thanks for the reply.

I have ran the testcase you gave me and it is indeed getting the jar from a drivers folder:

jar:file:/C:/Users/chris/git/Automation/Drivers/tika-app-1.24.1.jar!/org/apache/xerces/dom/NodeImpl.class

Hope this can help find me a solution.

Thanks

You have the tika-app-xxx.jar. Apparently it includes the classes of org.apach.xerces. This duplicates with the org.apache.xerces bundled in the Katalon Studio distribution. This duplication causes “java.lang.LinkageError: loader constraint violation in interface itable initialization”

You should get rid of the org.apache.xerces classes in the Drivers directory.

How ?

You can replace the jar with “tika-core”, which possibly does NOT include the Xerces classes.

https://mvnrepository.com/artifact/org.apache.tika/tika-core

1 Like

@kazurayam Legend/Hero springs to mind !!! :slight_smile:

That has worked!!

Thank you so much for taking the time to help me with this.