I’ve used getElementsCount in 7.8.2 with no problem. Today we decided to upgrade to 8.1.0 on a newer machine and run our scripts. The scripts fail on getElementsCount, and following error is displayed.
Unable to get element count (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