when you jar -t the jar is the class there?

On Fri, Jun 26, 2015 at 11:07 AM, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:

I am having trouble with Scott Klements POI examples, specifically it
can't find the HSSFWorkbook class

here's my classpath

Display Environment Var (*JOB)

Name . . . . . . . . . : CLASSPATH


Value . . . . . . . . . : '/java/poi-3.11/poi-3.11-20141221.jar'

(I know there are a lot of things missing, but this one jar should contain
what I am looking for right now).

Here is the error:

Additional Message Information

Message ID . . . . . . : RNQ0301 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 06/26/15 Time sent . . . . . . :
12:18:43

Message . . . . : Java exception received when calling Java method (C G D
F).
Cause . . . . . : RPG procedure XLCRTDEMO in program POI36/XLCRTDEMO
received Java exception "java.lang.NoClassDefFoundError:
org.apache.poi.hssf.usermodel.HSSFWorkbook" when calling method "<init>"
with signature "()V" in class
"org.apache.poi.hssf.usermodel.HSSFWorkbook".
Recovery . . . : Contact the person responsible for program maintenance
to
determine the cause of the problem.
Possible choices for replying to message . . . . . . . . . . . . . . . :
D -- Obtain RPG formatted dump.
S -- Obtain system dump.
G -- Continue processing at *GETIN.
C -- Cancel.
F -- Obtain full formatted dump.
Technical description . . . . . . . . : If the exception indicates that
the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the
return
type and parameter types match. You can determine the signatures for all
the
methods in class XYZ using command QSH CMD('javap -s XYZ').

Class not found, but this is a partial listing of
/java/poi-3.11/poi-3.11-20141221.jar:
48842 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFSheet.class
8073 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFSheetConditionalFormatting.class
8574 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFSimpleShape.class
8258 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFTextbox.class
1623 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFWorkbook$SheetRecordCollector.class
45991 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HSSFWorkbook.class <<<<<
2622 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HeaderFooter$MarkupTag.class
4946 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/usermodel/HeaderFooter.class
3404 Wed Dec 17 01:02:58 EST 2014
org/apache/poi/hssf/usermodel/StaticFontMetrics.class
729 Wed Dec 17 01:02:58 EST 2014
org/apache/poi/hssf/util/AreaReference.class
656 Wed Dec 17 01:02:58 EST 2014
org/apache/poi/hssf/util/CellRangeAddress.class
2030 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/util/CellRangeAddress8Bit.class
1108 Wed Dec 17 01:02:58 EST 2014
org/apache/poi/hssf/util/CellRangeAddressList.class
841 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/util/CellReference.class
3248 Wed Dec 17 01:02:58 EST 2014
org/apache/poi/hssf/util/HSSFCellUtil.class
845 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/util/HSSFColor$AQUA.class
1013 Wed Dec 17 01:02:56 EST 2014
org/apache/poi/hssf/util/HSSFColor$AUTOMATIC.class

The class is obviously there.

I did the following in QShell, this is a partial list of environment
variables
OSTYPE=os400
MACHTYPE=powerpc-ibm-os400
CLASSPATH=/java/poi-3.11/poi-3.11-20141221.jar <<<< This is the
whole classpath for this session
TERMINAL_TYPE=5250
PATH=/usr/bin:.:/QOpenSys/usr/bin

Yet I get the following error:
$
javap -s org.apache.poi.hssf.usermodel.HSSFWorkbook
ERROR:Could not find org.apache.poi.hssf.usermodel.HSSFWorkbook

and here is what that directory looks like:
$
cd /java/poi-3.11
$
ls
poi-3.11-20141221.jar
$

How do I coerce java to find the class? In qshell and RPG.


Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
--
This is the Java Programming on and around the IBM i (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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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 [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.