I'm trying to load an XML file and have started to get an error after updating Katalon from 6.1.5 to 6.2.
Error in question: java.lang.NoClassDefFoundError: org/w3c/dom/elementtraversal
Error is thrown when trying to parse the file.
Even though the error is pretty clear that the class is not recognized / found; I ruled out malformed XML file.
File docXmlFile = new File("C:\\data", "info.xml");
DocumentBuilderFactory factory = DocumentFactoryBuilder.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(docXmlFile); // error is thrown here!
Element root = doc.getDocumentElement(); // this line isn't reached
Trying to figure out what had changed as this code has been working for quite a while.
If i had to guess it's probably some dependency or missing JAR file, not sure which one and how to fix it.
According to this post on Katalon forum, this is a known issue that has been fixed in version 6.2.1.