Errors with CFSpreadsheet

New Here ,
Sep 18, 2014 Sep 18, 2014

Copy link to clipboard

Copied

When using CF10 and the CFSpreadsheet tag, we're receiving the following error:

Class org.apache.poi.hssf.usermodel.HSSFWorkbook does not implement the requested interface org.apache.poi.ss.usermodel.Workbook

The simple code works on other servers, so I think there is something wrong with the server config. Any ideas?

Views

399

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2015 Aug 05, 2015

Copy link to clipboard

Copied

LATEST

We had that error as well, and found that we had more than one version of POI lurking in other files.

Try this code to find where the POI calls are coming from and remove any old versions:

<cfset poi = createObject("java", "org.apache.poi.Version")/>

<cfoutput>#poi.getVersion()#</cfoutput>

<cfdump var = "#poi#">

<cfset WorkBook = CreateObject(

                "java",

                "org.apache.poi.hssf.usermodel.HSSFWorkbook"

                ).Init()>

<cfdump var = "#WorkBook#">

<cfset loader = WorkBook.class.getClassLoader()>

<cfdump var = "#loader#">

<cfset res = loader.getResource("org/apache/poi/hssf/usermodel/HSSFWorkbook.class")>

<cfoutput>#res.getPath()#</cfoutput>

<cfset poixml = createObject("java", "org.apache.poi.POIXMLDocument")>

<cfdump var = "#poixml#">

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines