|
As near as I can tell, the JVM runs in the same job as your RPG, not
in a batch interactive job. Even if it did, that job would run as your
user profile, even if it started as QUSER or some other system user.
I'm looking at this job log for an RPG program we have that calls java
methods.
QNTC is pretty flaky. You'll (your user profile name) have to have
permission to the file in the Windows directory and you'll have to
have permission to the Windows share, besides having permission to the
symlink you describe. That means you have to have the same user id set
up as a user profile on the machine where the share lives and that
user has to be granted authority to read and write the file.
System:
RJS4003
Job . . : STRCWPNEP User . . : DKIMMEL Number . . . :
332790
>> STRCWPNEP
Library RJSIMAGE already exists in library list.
Library RJSFLOW already exists in library list.
Object FLOJOBLIST in QTEMP type *USRSPC not found.
Library RJSIMAGE already exists in library list.
Library RJSFLOW already exists in library list.
Java Virtual Machine is Classic.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Wednesday, March 03, 2010 2:58 PM
To: Java Programming on and around the iSeries / AS400
Subject: Using HSSF POI to open file in QNTC
Hi Everyone,
I'm using Scott Klement's HSSFR4 service program to open a spreadsheet
in a folder on a Windows box to which my userid/pswd has authority(i.e.
I can open it via WRKLNK option 5), yet when my RPGLE program tries to
open it with the HSSF_Open procedure, it fails with:
RNX0301
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure HSSF_OPEN in program UTLIB/HSSFR4
received
Java exception "java.io.FileNotFoundException: Permission denied.
/J/Accounting/FRG/ICG/Product Master Maint Template.xls" when
calling method
"<init>" with signature "(Ljava.lang.String;)V" in class
"java.io.FileInputStream".
Note that "/J" is a symbolic link to "/QNTC/MyServer/MyFolder" (names
change blah blah). This does not appear to be a factor. If I move
the spreadsheet to another directory within "/J" to which *PUBLIC has
*RW authority, it opens just fine.
My theory is that the class "java.io.FileInputStream" is actually
running in a batch interactive job spawned from my job, and that batch
interactive job is running under QUSER or some other userid that does
not have authority to the "/J/Accounting" folder.
My questions are 1) is my theory correct? 2) how can I see what user
the batch interactive job is actually using? and 3) is there a way to
have the batch interactive job use my userid/pswd?
tia,
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx<mailto:pdow@xxxxxxxxxxxxxxx> /
--
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 athttp://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.