Hi. I’ve been working on a new version of my standalone Lucee Spreadsheet library which uses the newly released version 4.0 of POI.
POI 4.0 is a major, non-backwards compatible release but I’ve managed to work through the changes and all tests pass when running on my standard Lucee 5.2/'Tomcat 8.5 installation.
However when I next turned to use the awesomeness of CommandBox to run the suite against the other engines I support (which include ACF), a number of tests failed with the following exception:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.util.DocumentHelper
At first I thought this was an ACF-specific issue as that’s the engine I first tested using CommandBox, but the same happened with my Lucee 4.5 and Lucee 5 embedded servers.
I won’t post the full stack trace because you can see it on this SO question reporting the same problem with POI 4.0:
Here the finger is pointed at an outdated XML parser in Wildfly, and as I believe that’s what CommandBox uses, my conclusion is that the issue is specific to CommandBox.
Unfortunately, adding the updated Xerces 2.12 jar to my JavaLoader paths as a “direct dependency” doesn’t fix things as it seems to have done for the SO questioner (who is working directly in Java not CFML obviously). Nor does replacing the jar in the embedded ACF’s lib path.
I’ve also tried updating the XmlBeans jar to 3.0.2 in the hope that the recent patch there would address the issue, but no joy.
Does anyone have any suggestions as to how I might manually patch my CommandBox install to use the newer jar, or have any other insight that might help?
If you want to run the test suite yourself, the code is on the develop branch:
Julian (aka CFSimplicity)