I'm receiving an error when trying to create an XSSFWorkbook
Code
currentCharterTemplate = 'UnusedTicketsWorkbook.xlsx';
currentFilePath = getDirectoryFromPath(getCurrentTemplatePath());
javaFile = createObject('java', 'java.io.File').init(currentFilePath & currentCharterTemplate);
excelFile = createObject('java', 'java.io.FileInputStream').init(javaFile);
xssfWorkbook = createObject('java', 'org.apache.poi.xssf.usermodel.XSSFWorkbook');
xssfWorkbook = createObject('java', 'org.apache.poi.xssf.usermodel.XSSFWorkbook').init(excelFile);
I also tried just the line below and I receive the same error.
xssfWorkbook = createObject('java', 'org.apache.poi.xssf.usermodel.XSSFWorkbook');
Error
cannot load class through its string name, because no definition for the class with the specified name
[org.apache.poi.xssf.usermodel.XSSFWorkbook] could be found caused by (java.lang.ClassNotFoundException:org.apache.poi.xssf.usermodel.XSSFWorkbook;
java.lang.ClassNotFoundException:org.apache.poi.xssf.usermodel.XSSFWorkbook not found by lucee.core [46];)
I've installed the cfspreadsheet extension for Lucee, and restarted Lucee and my computer, I've verified cfspreadsheet-3.0.1.jar is available in C:\lucee\tomcat\lucee-server\bundles along with all the other jar files included with lucee.
If I open the jar with 7-zip, I can see poi-ooxml-3.15.jar is included. Within that jar I can browse to C:\lucee\tomcat\lucee-server\bundles\cfspreadsheet-3.0.1.jar\poi-ooxml-3.15.jar\org\apache\poi\xssf\usermodel\XSSFWorkbook.class
The lucee.core in the error message makes me think it's not recognizing jars from my extensions, but I can't find a setting to enable this.
5.3.6.61but downgraded to5.3.3.62and had the same issue. - Matt Busche