Capital™ Error message is captured in application log file when invoking a Capital plugin ... java.lang.ExceptionInInitializerError at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.build(SchemaTypeLoaderImpl.java:xxx)

2023-08-07T17:55:59.000-0400
Capital Capital Harness Designer Modular

Summary

When executing a Capital plugin in 2207, this exception ... java.lang.ExceptionInInitializerError at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.build(SchemaTypeLoaderImpl.java:157) at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:198) ... is contained in the application log file.


Details

The plugin had previously worked as expected in Capital 2020.1 and 2021.1 and does not throw an exception upon invoking it 2207.

The issue occurs because the xmlbeans.jar is of a different version in Capital compared to the one placed in the ...\plugin\extras folder.
  • Capital uses xmlbeans.jar version 2.6.0
  • Plugin uses xmlbeans.jar version 5.1.1

It appears that there is a problem with xmlbeans 5.1.1 which attempts to still use the older version of the classes.

These old classes are in the package: schemaorg_apache_xmlbeans.  Since these classes are not in the new version of the jar but it tries to use them, and loads the classes from Capital version as well causing conflict or ambiguity among the classes with the same names.

image.png

Here are two relevant pages which were found mentioning the issue.
https://stackoverflow.com/questions/66112601/runtime-exception-poi-5-and-xmlbeans
https://stackoverflow.com/questions/67309369/apache-poi-5-and-xmlbeans-classpath-issues
 

KB Article ID# KB000121073_EN_US

Contents

SummaryDetails

Associated Components

Capital