Cannot validate the XSD schema for an xml report

@anouar.baghouz

  1. I would recommend you NOT to try advanced XML processing in Katalon Studio, such as validating XML instances with XSD Schemas because I believe that nobody has ever tried it. You are likely to encounter more problems. If you want to do validation, you had better do it outside KS controlling the environment for yourself.

  2. Still you can try deleting “stax-api-1.0.0.jar” out of the Katalon’s classpath. I believe that the stax-api.x.x.x.jar is not necessary. Everything developed by that project has already been taken over by the JAXP API which is bundled in the JavaSE 1.4 and later.


I could not help trying it. I deleted the stax-api-1.0.1.jar from my Katalon Studio and ran the following script:

import javax.xml.XMLConstants

URL u = XMLConstants.class.getResource("/" + XMLConstants.class.getName().replaceAll("\\.", "/") + ".class");
System.out.println(u);

println XMLConstants.W3C_XML_SCHEMA_NS_URI

The output was fine:

2021-03-11 20:49:33.086 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2021-03-11 20:49:33.094 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/TCb
2021-03-11 20:49:34.930 DEBUG testcase.TCb                             - 1: u = XMLConstants.getResource("/" + getName().replaceAll("\.", "/") + ".class")
2021-03-11 20:49:34.955 DEBUG testcase.TCb                             - 2: out.println(u)
jar:file:/Applications/Katalon%20Studio.app/Contents/Eclipse/jre/Contents/Home/lib/rt.jar!/javax/xml/XMLConstants.class
2021-03-11 20:49:34.988 DEBUG testcase.TCb                             - 3: println(W3C_XML_SCHEMA_NS_URI)
http://www.w3.org/2001/XMLSchema
2021-03-11 20:49:35.013 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/TCb

The orthodox XMLConstant class was found and loaded from the JDK’s rt.jar.