Skip to main content
Inspiring
March 8, 2007
Question

Apache POI

  • March 8, 2007
  • 2 replies
  • 624 views
Hi,

I have installed cfx_excelQuery [ into web-inf\lib\ ], and registered the tag then extracted the zip[ poi-2.5.1-final-20040804 ] into \web-inf\lib\ ...Then restarted the CF service ..still I am getting this...I am using CF server 6,1,0,63958 on windows 2000 server..


Object Instantiation Exception.
Class not found: org.apache.poi.hssf.usermodel.HSSFWorkbook

The error occurred in D:\CFusionMX\wwwroot\1.cfm: line 12

10 : <cfscript>
11 : fis = createObject("java", "java.io.FileInputStream").init("c:\template.xls");
12 : wb = createObject("java", "org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fis);
13 : sheetNumber = wb.getSheetIndex("Sheet1");
14 : fis.close();


    This topic has been closed for replies.

    2 replies

    Inspiring
    March 8, 2007
    I checked the Zip file from
    http://ftp.wayne.edu/apache/jakarta/poi/release/bin/
    and the jar file is present
    March 8, 2007
    poi-2.5.1-final-20040804 is usually distributed as a jar. Put this jar in cfusionmx/lib or on j2ee version put in WEB-INF/cfusion/lib and restart. No need to expand the jar contents. Alternately put the jar in any directory outside the cfmx structure and specify the path in the jvm.config classpath including the filename.
    emmim44Author
    Inspiring
    March 8, 2007
    I couldnt find that poi-2.5.1-final-20040804.jar file within that zip....where is it ?
    Participating Frequently
    March 8, 2007
    Make sure you download the bin zip file and not the src zip file.