David P. Caldwell
2018-11-25 12:24:19 UTC
I attempted to upgrade my POI installation from 3.15 to 4.0.0, but my
software now fails with a ClassNotFoundException -- specifically, it
cannot find:
java.lang.NoClassDefFoundError:
org/apache/commons/compress/archivers/zip/ZipFile
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:298)
at org.apache.poi.ooxml.util.PackageHelper.open(PackageHelper.java:37)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:307)
The way my software attempts to embed the POI libraries is:
1. Download the distribution and unzip it,
2. Put every .jar in the lib/ directory in the classpath,
3. Put every .jar in the ooxml-lib directory in the classpath,
4. Put every .jar in the top-level directory in the classpath.
I then updated to 3.17 and this worked fine. So the breaking change
(for my code) is between 3.17 and 4.0.0.
Am I doing this right? I haven't yet started searching through the JAR
files for this class and its dependencies. I do notice that the 3.17
distribution seems to contain quite different JAR files than the 4.0.0
distribution (which contains JAXB, Java Activation Framework and so
forth), so I am guessing there was some rearchitecting of dependencies
and either there's something missing or I have to reorganize my code
loading strategy above.
Any ideas?
- David P. Caldwell
http://www.davidpcaldwell.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
software now fails with a ClassNotFoundException -- specifically, it
cannot find:
java.lang.NoClassDefFoundError:
org/apache/commons/compress/archivers/zip/ZipFile
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:298)
at org.apache.poi.ooxml.util.PackageHelper.open(PackageHelper.java:37)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:307)
The way my software attempts to embed the POI libraries is:
1. Download the distribution and unzip it,
2. Put every .jar in the lib/ directory in the classpath,
3. Put every .jar in the ooxml-lib directory in the classpath,
4. Put every .jar in the top-level directory in the classpath.
I then updated to 3.17 and this worked fine. So the breaking change
(for my code) is between 3.17 and 4.0.0.
Am I doing this right? I haven't yet started searching through the JAR
files for this class and its dependencies. I do notice that the 3.17
distribution seems to contain quite different JAR files than the 4.0.0
distribution (which contains JAXB, Java Activation Framework and so
forth), so I am guessing there was some rearchitecting of dependencies
and either there's something missing or I have to reorganize my code
loading strategy above.
Any ideas?
- David P. Caldwell
http://www.davidpcaldwell.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org