|
All,
I'm trying to prototype one of the POI methods in rpg. I'm having trouble
with POIFSFileSystem.
In java, this works:
java.io.FileInputStream fis = null;
fis = new FileInputStream("C:/template/POI-template.xls");
org.apache.poi.poifs.filesystem.POIFSFileSystem poifs = null;
poifs = new org.apache.poi.poifs.filesystem.POIFSFileSystem(fis);
But it RPG it doesn't.
In RPG, I prototyped POIFSFileSystem like this:
D jPOIFSFile...
D pr O extproc(*java
D
:'org.apache.poi.poifs.filesystem-
D .POIFSFileSystem'
D :*CONSTRUCTOR)
D class(*java
D
:'org.apache.poi.poifs.filesystem-
D .POIFSFileSystem')
D arg0 O class(*java
D :'java.io.FileInputStream')
D
D inFile s O class(*JAVA
D :'java.io.FileInputStream')
// filename is a String object
inFile = jInFile(filename);
poifs = jPOIFSFile(inFile);
When I run it, I get this error:
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure TEST_TEMPL in program QGPL/POITEST
received Java exception "java.lang.NoSuchMethodError: <init>" when
calling
method "<init>" with signature "(Ljava.io.FileInputStream;)V" in class
"org.apache.poi.poifs.filesystem.POIFSFileSystem".
I ran the qsh command that the help suggests:
qsh cmd('javap -s org.apache.poi.poifs.filesystem.POIFSFileSystem')
Which returns (in part) this:
public
org.apache.poi.poifs.filesystem.POIFSFileSystem(java.io.InputStream);
throws java/io/IOException
Signature: (Ljava/io/InputStream;)V
java.io.InputStream is an abstract class.
Anyone have any ideas what I need to do for this to work?
Thanks,
Phil
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.