1 Reply Latest reply on Aug 5, 2015 5:13 PM by nealb

    Errors with CFSpreadsheet

    bemerson71

      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?

        • 1. Re: Errors with CFSpreadsheet
          nealb

          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#">