Issue in executing a feature file

Hi Team,
I am not able to run a Feature File. I am getting the following error, please help me in fixing this issue, its blocking my automation design work.

=============== ROOT CAUSE =====================
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

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

07-13-2021 10:26:54 PM Verification

Elapsed time: 0.875s

Verification FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: cucumber.runtime.CucumberException: 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 cucumber.runtime.formatter.PluginFactory.newInstance(PluginFactory.java:110)
at cucumber.runtime.formatter.PluginFactory.instantiate(PluginFactory.java:91)
at cucumber.runtime.formatter.PluginFactory.create(PluginFactory.java:76)
at cucumber.runtime.RuntimeOptions.getPlugins(RuntimeOptions.java:317)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:306)
at cucumber.runtime.Runtime.run(Runtime.java:97)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main$run.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:106)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:73)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:246)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at WSVerification1626233214257.run(WSVerification1626233214257:2)
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.WSVerificationExecutor.runScript(WSVerificationExecutor.java:178)
at com.kms.katalon.core.main.WSVerificationExecutor.doExecute(WSVerificationExecutor.java:172)
at com.kms.katalon.core.main.WSVerificationExecutor.processExecutionPhase(WSVerificationExecutor.java:155)
at com.kms.katalon.core.main.WSVerificationExecutor.accessMainPhase(WSVerificationExecutor.java:147)
at com.kms.katalon.core.main.WSVerificationExecutor.execute(WSVerificationExecutor.java:129)
at com.kms.katalon.core.main.TestCaseMain.runFeatureFile(TestCaseMain.java:172)
at com.kms.katalon.core.main.TestCaseMain$runFeatureFile$0.call(Unknown Source)
at TempTempCase1626233210749.run(TempTempCase1626233210749.groovy:25)
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
at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown Source)
at cucumber.runtime.formatter.JUnitFormatter.(JUnitFormatter.java:88)
at cucumber.runtime.formatter.PluginFactory.newInstance(PluginFactory.java:104)
… 26 more
)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:70)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:73)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:246)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at WSVerification1626233214257.run(WSVerification1626233214257:2)
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.WSVerificationExecutor.runScript(WSVerificationExecutor.java:178)
at com.kms.katalon.core.main.WSVerificationExecutor.doExecute(WSVerificationExecutor.java:172)
at com.kms.katalon.core.main.WSVerificationExecutor.processExecutionPhase(WSVerificationExecutor.java:155)
at com.kms.katalon.core.main.WSVerificationExecutor.accessMainPhase(WSVerificationExecutor.java:147)
at com.kms.katalon.core.main.WSVerificationExecutor.execute(WSVerificationExecutor.java:129)
at com.kms.katalon.core.main.TestCaseMain.runFeatureFile(TestCaseMain.java:172)
at com.kms.katalon.core.main.TestCaseMain$runFeatureFile$0.call(Unknown Source)
at TempTempCase1626233210749.run(TempTempCase1626233210749.groovy:25)
Caused by: cucumber.runtime.CucumberException: 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 cucumber.runtime.formatter.PluginFactory.newInstance(PluginFactory.java:110)
at cucumber.runtime.formatter.PluginFactory.instantiate(PluginFactory.java:91)
at cucumber.runtime.formatter.PluginFactory.create(PluginFactory.java:76)
at cucumber.runtime.RuntimeOptions.getPlugins(RuntimeOptions.java:317)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:306)
at cucumber.runtime.Runtime.run(Runtime.java:97)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main$run.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:106)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
… 16 more
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
at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown Source)
at cucumber.runtime.formatter.JUnitFormatter.(JUnitFormatter.java:88)
at cucumber.runtime.formatter.PluginFactory.newInstance(PluginFactory.java:104)
… 26 more

Most probably, the same problem as follows:

Probablly you have multiple versions of Apache Xerces library in your project classpath, that causes error. You need to remove unwanted Xerces.

Please check from which jar the NodeImpl class is loaded. See the following post to know how

Thanks for the Reply @kazurayam,

When I tried running that test case, I am getting the same error, so I am not able to see from which jar file its coming.

@mx824y

You looked at the “Log Viewer” tab. It is not the place you should look at.

Please look at the “Console” tab. There you will find output from System.out.println

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/mx824y/Downloads/Softwares/Katalon_Studio_Windows_64-8.0.5/plugins/ch.qos.logback.classic_1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/mx824y/Katalon%20Studio/SPT-OM%20-%20Order%20Summary%20and%20Detail/Plugins/katalon-studio-jmeter-integration-plugin-1.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
2021-07-16 16:00:22.859 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2021-07-16 16:00:22.897 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/test/testJava
2021-07-16 16:00:23.564 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/test/testJava FAILED.
Reason:
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 com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
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:369)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:360)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:339)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:331)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:248)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1626469219264.run(TempTestCase1626469219264.groovy:25)

2021-07-16 16:00:23.595 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/test/testJava

This is what I see in the console output when I executed that test cases. Could you please tell me what I need to do next.

Let me ask you some questions.

Q1. It seems you installed Katalon Studio into the folder C:/Users/mx824y/Downloads/Softwares/Katalon_Studio_Windows_64-8.0.5. Am I right?

Q2. It seems you created a project at /C:/Users/mx824y/Katalon Studio/SPT-OM - Order Summary and Detail/. Am I right?

Q3. It seems you created a Test Case named Test Cases/test/testJava. Am I right?

Q4. The content of the testJava is exactly as follows. Just 3 lines. No more lines added. Am I right?

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

Q5. It seems you have installed JMeter Integration plugin v1.0.0. Am I right?

Q6. The JMeter plugin has already discontinued support as of Katalon Studio v7.0.0. You should no longer use it with v8.0.5. Are you aware of it?

Q7. Could you remove the JMeter plugin out of your KS, and try the testJava again? What do you see?

Q8. Stop Katalon Studio. Get the list of folder contents of the /C:/Users/mx824y/Katalon Studio/SPT-OM - Order Summary and Detail/plugin?

Q9. Stop Katalon Studio. Get the list of folder contents of the /C:/Users/mx824y/Katalon Studio/SPT-OM - Order Summary and Detail/drivers as well?

Please check the Q7 above, and let me know what you see.


If you visit the Katalon Store right now, you will find the JMeter Integration plugin is no longer available there. But your project seems to have one. I wonder how you got the plugin installed. Is it the case that you had created the project long ago using Katalon Studio 6.x and had installed the JMeter Integration plugin, and you have upgraded to v8.0.5 recently?

Ans1: Yes, that’s correct, that’s where Katalon Studio is installed.

Ans2: Yes, the project is under this path /C:/Users/mx824y/Katalon Studio/SPT-OM - Order Summary and Detail/

Ans3: Yes, I created a test case in Katalon under Test Cases/test/testJava

Ans4: Yes, the content is correct as you mentioned:
import org.apache.xerces.dom.NodeImpl
URL u = NodeImpl.class.getResource("/" + NodeImpl.class.getName().replaceAll("\.", “/”) + “.class”);
System.out.println(u);

Ans5: Yes, I have installed JMeter Integration plugin v1.0.0

Ans6: No, I haven’t aware of the fact that JMeter plugin was discontinued from KS V7.0.0

Ans7: Yes, I removed the plugin and ran the testJava again, and now I dont see any errors and here is the path I see in console: “jar:file:/C:/Users/mx824y/Downloads/Softwares/Katalon_Studio_Windows_64-8.1.0/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”

Ans8: These are following list of Plugins I have under this folder:
katalon-dbms-keywords
katalon-jira-plugin-1.0.8
katalon-jira-plugin-1.0.9
katalon-studio-microsoftteam-keywords-plugin
and under Plugins/Platform folder --> katalon-studio-jira-plugin-1.0.14, katalon-studio-kobiton-1.0.0

Ans9: My Drivers folder is empty

Thanks a lot @kazurayam, you are great, by removing the JMeter Integration resolved my issue and I could able to execute the feature file. Thanks a lot.

1 Like

@mx824y

Could you answer to the following question?

@mx824y

You seem to have 3 versions of “JIRA plugins”. It looks odd. Do you have any idea why you have these 3 versions?

It seems that you would only need “Plugins/Platfor/katalon-studio-jira-plugin-1.0.14” and you do not need other 2 older versions. I know nothing about this plugin, but I guess that you previously installed the version 1.0.8 and 1.0.9 manually. And the version1.0.14 was bundled in a recent version of Katalon Studio distributable; so that you are not aware of the version 1.0.14 is present. Am I right?


What am I concerned? — Having different versions of a single series of jars often causes serious problems. Problems caused by version conflict are hard to debug.

  1. Why do you have the version 1.0.8 and 1.0.9 together? Do you have any idea? I think Katalon Studio’s plugin-installation processing should be responsible for removing older version (1.0.8) when you manually installed the new one (1.0.9). But actually it doesn’t do what it should do. KS carelessly left an older version together with newer version. I think that KS should improve its plugin installation processing.

  2. If KS bundles a newer version (1.0.14), then it should remove the older jars; or at least warn that other older versions are present in the Plugins directory. KS should improve its plugin management.

@ThanhTo
@duyluong

In my humble opinion, Katalon Studio’s Plugin management is not implemented careful enough. I think Katalon Team should introduce Gradle’s dependency management fully.

Hi @kazurayam,

Katalon Studio (KS) plugins can be used in both online and offline mode.

Online mode means users install plugins on Katalon Store. When users activate KS or clicking on Reload plugin button, KS will automatically download the suitable version to KS installed folder (not user’s project folder). If a plugin has multiple versions, KS will choose the most suitable version to apply. Therefore, this is no chance of plugin duplication happens.

For offline mode, users manually download the plugin (as .jar file) and put the jar to the Plugins folder. KS only loads plugins from Plugins folder so maybe the project owner forgot to remove the old plugin version when they apply a new one.

Many thanks for your supporting on this thread and your concern. We will review the installation process and consider improving if we think it’s necessary.

What is Plugins/Platform folder?