I find myself with a katalon problem in version 7.9.1 and it is that when working with variables in datafiles, when I have to pass them to the service to run it, it fails with the following error message:
java.lang.LinkageError: loader constraint violation: when resolving field “NODE”
I leave you in particular the case in which it fails.
String chasis = findTestData(‘Datos_Generales/ChasisYMotor’).getValue(‘CHASIS’, 1)
String motor = findTestData(‘Datos_Generales/ChasisYMotor’).getValue(‘MOTOR’, 1)
ResponseObject response = WS.sendRequest(findTestObject(‘Object Repository/WebSevices/Empadronamiento/VerificoEmp’,
[(‘chasis’) : chasis
, (‘motor’) : motor
, (‘gd’) : GlobalVariable.deloreanId
, (‘usuario’) : GlobalVariable.usuario]));
Y el error que lanza cuando se ejecuta eso es:
Root cause: java.lang.LinkageError: loader constraint violation: when resolving field “NODE” the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the referring class, javax/xml/xpath/XPathConstants, and the class loader (instance of ) for the field’s resolved type, javax/xml/namespace/QName, have different Class objects for that type
I apologize, at that time I had the project open in version 7.8.2 to test if it worked in that version. And in fact in version 7.8.2 if it works the problem is found from that onwards.
Here is the .classpath with version 7.9.1
Possibly you once ran that project in Katalon Studio v7.8.2 successfully. Later you upgraded Katalon Studio to v7.9.2. Then the .groovy codes needs to be re-compiled in the KS v7.9.1, but you haven’t done it. Therefore java.lang.LinkageError occured. — This is what I guess.
How to fix?
Stop Katalon Studio v7.9.1
delete <projectDir>/.classpath file
delete <projectDir>/bin directory
delete <projectDir>/Libs directory
restart Katalon Studio, open the project, and run it
This will force the .groovy codes to be cleanly re-compiled.
I did the steps mentioned above but I still have the same problem.
I deleted katalon, I downloaded it again, I deleted the .classpath and the two directories bin and libs.
Then I reopened katalon and the project but I still get the same error.
This message tells me that javax.xml.namespace.QName class is loaded from jar:file:/Applications/Katalon%20Studio.app/Contents/Eclipse/configuration/resources/lib/stax-api-1.0.1.jar! file.
I believe that the QName class should not be loaded from stax-api-1.0.1,jar. It should be loaded from the rt.jar just as the XPathConstants class is loaded from the rt.jar. This is a bug mistakenly introduced in Katalon Studio 7.9.x.