• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

POI [ Apache]

Participant ,
Mar 16, 2007 Mar 16, 2007

Copy link to clipboard

Copied

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();
</script>
<cfdump var="#sheetNumber#">
TOPICS
Advanced techniques

Views

427

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
Advocate ,
Mar 16, 2007 Mar 16, 2007

Copy link to clipboard

Copied

I'm not sure if this helps or not, but in CFMX7 the class comes in the directory:

C:\CFusionMX7\lib instead of \web-inf\lib

you could try moving it to the corresponding directory in the CFusionMX folder for 6.1.

Votes

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
Enthusiast ,
Mar 17, 2007 Mar 17, 2007

Copy link to clipboard

Copied

Hi em,
I tested your cfscript with poi-2.5.1-final-20040804.jar installed as follows:
in cfusionmx\lib - code works
in cfusionmx and added to classpath in jvm.config - code works
in cfusionmx\wwwroot\WEB-INF\lib - code works

I followed up with expanding the jar into WEB-INF\lib and the code failed, just as with yours. So, install the jar without expanding its contents and you should be good to go.

Votes

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
Participant ,
Mar 19, 2007 Mar 19, 2007

Copy link to clipboard

Copied

LATEST
Thank u man.

so you are suggesting me to install the jar into mx/lib folder and then change the JVM accordingly ?

Thanks

Votes

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
Resources
Documentation