0

We are using Apache POI to create a very simple spreadsheet. Everything works in the development environment. When released, the project is exported as a runnable JAR; this jar and all required libraries are placed on a central server. The various PCs all reference these same files.

On most PCs (Linux and Win7), everything works. On a minority of Win7 machines, however, we receive the error:

DOMSource cannot be processed: check that saxon9-dom.jar is on the classpath.

I have tried adding the -D option as suggested here, to no avail. In any case, it's unclear why the dependencies should break only on certain machines. Could there be a difference in the order that the libraries are loaded?

I have also tried extracting all dependencies into the exported the jar file. This (very fat!) jar file work - or doesn't work - on exactly the same machines.

I am at a loss: what could cause Apache POI to fail in this way on certain machines?

5
  • That doesn't look like an Apache POI error - what's it coming from? Is there a full stacktrace?
    – Gagravarr
    Sep 23, 2015 at 9:34
  • No stack trace. It's an isolated message that is written to the console (three times) when the program runs. It is definitely coming out of (or caused by) the POI classes. Old-fashioned debugging: I put a System.out.println just before and just after the very first call to a POI method. Sep 23, 2015 at 13:18
  • 1
    Apache POI makes use of JVM-provided XML processing, do you have some weird XML processing configuration in your JVM?
    – Gagravarr
    Sep 23, 2015 at 16:54
  • We don't otherwise use any XML in the application. I suppose it's possible that some other Java application has run on the affected machines and made changes to the Java defaults. However, there is no lib/jaxp.properties file. Not sure where else to look for potential changes? Sep 23, 2015 at 17:19
  • No idea, you might be best off asking a new question that's specific to saxon
    – Gagravarr
    Sep 23, 2015 at 17:29

1 Answer 1

0

This turns out to have been a problem with an older version of LibreOffice (specifically, the affected systems were still running version 3.6). Updating to LibreOffice 5.0 resolved the issue.

Exactly how/why LibreOffice was affecting the XML processing in Apache POI is unclear. At any rate, it is now unimportant.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.