Details
-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
5.4.9
-
None
-
None
-
Java jdk1.7.0_51
Windows 7 Enterprise
Magnolia EE 5.4.9 local installation (repository on Derby DB)
Description
I've just implemented a simple Magnolia job, that reads an Excel file (xls or xlsx doesn't matter) and print some Excel cell values on stdout (at this time, the next step consists of storing these values on a database table).
I'm using the apache POI API poi-3.9.jar available on /magnoliaAuthor/WEB-INF/lib folder.
After running my job, I get the following exception:
{{
ERROR org.quartz.core.ErrorLogger 10.11.2016 12:37:00 – Job (magnolia.splittingXLSDealUserJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NoClassDefFoundError: org/apache/poi/UnsupportedFileFormatException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:234)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.NoClassDefFoundError: org/apache/poi/UnsupportedFileFormatException}}
The official Apache POI API FAQ (http://poi.apache.org/faq.html#faq-N10204) explains that " A combination such as poi-3.11.jar and poi-ooxml-3.9.jar is not supported, and will fail to work in unpredictable ways"
I've noticed that Magnolia 5.4.9 EE bundle comes with these Apache POI libs:
- poi-3.9.jar
- poi-ooxml-schemas-3.11-beta2.jar
- poi-ooxml-3.11-beta2.jar
- poi-scratchpad-3.11-beta2.jar
So it seems that my issue is related to a compatibility problem between the "master" POI lib (3.9) and the others "slave" POI libs (3.11).
For testing purposing I've tried to run the same job on another Magnolia 5.4.9 EE instance, where I've changed "3.11" slave POI libs with "3.9" libs (downloaded from https://archive.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip): it works fine.
At this time I need to know which of the following options do you suggest in order to solve my issue:
1) downgrade 3.11 "slave" POI libs to 3.9 (as I've just succesfully tested on my environment)
2) upgrade all (master + slave) POI lib to the latest stable version (3.15)
With the default "Magnolia 5.4.9 POI" config it seems to be blocked any "read & write" Apache POI action on any Excel file.
Best regards,
Giovanni