After happily using POI 2.0 with Scott Klement's HSSFR4 service program
for several years, I finally got a project that requires upgrading to a
version that can handle .xlsx spreadsheets. Luckily, Scott has been
busy keeping up with this, and has an upgraded HSSFR4.
I installed Scott's service program, and POI 3.6, then set the
environment for 3.6 with the following environment variables:
Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 06/23/11 Time sent . . . . . . :
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure SS_FORMULA in program POI36/HSSFR4
Java exception "java.lang.NoSuchMethodError:
when calling method "setCellFormula" with signature
in class "org.apache.poi.ss.usermodel.Cell".
In HSSFR4, the procedure SS_FORMULA does this:
0580.00 SSCell_setCellFormula(wwCell: wwStr);
And SSCell_setCellFormula has the following prototype in HSSF_H:
0793.00 D SSCell_setCellFormula...
0794.00 D PR EXTPROC(*JAVA
0795.00 D : CELL_CLASS
0796.00 D : 'setCellFormula')
0797.00 D cell_formula like(jString)
where CELL_CLASS is defined as
0172.00 D CELL_CLASS...
0173.00 D C 'org.apache.poi.ss.usermodel-
0174.00 D .Cell'
A couple of things jumped out at me:
- in the error message, AbstractFunctionPtg.isBuiltInFunctio" looks
chopped off, so the question is, what's the full name that it cannot
- the error message refers to a class in poi/hssf which is the old .xls
spreadsheet stuff, not the newer .xlsx stuff which is in poi/ss.
I did some googling and saw that someone else had a similar error, and
Scott noted that the problem appears to be in the POI Java code. Not
being a Java programmer, I nevertheless did some poking around -- I got
Java Decompiler jd-gui.exe version 0.3.3 installed on my PC and used it
to look at
and all I see is
public abstract void setCellFormula(String paramString)
Since this is an "abstract" class, there is no code; presumably a
non-abstract subclass implements the SetCellFormula method. I'm guessing
here that Java looks in every .jar file in the class path and manages to
find AbstractFunctionPtg.isBuiltInFunctio" in
org/apache/poi/hssf/record/formula. At this point I'm getting kind of
lost in the Java code, but it seems ok to me.
Can any of you Java experts see anything obvious that I'm doing wrong?
Or is this a POI problem?
This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.