Hi Dan,

In this case, my user profile does have authority to the file in question -- I can open it with DSPLNK.

The reason I think there's a batch interactive job involved has to do with this old thread that solved a problem for me some time ago: http://archive.midrange.com/java400-l/200303/msg00060.html

After that, I was using SQL2JXL and got this message:

JVAB546 Escape 30 10/25/09 03:45:45.004512 QJVAUTLJVM QSYS *STMT SQL2JXLC UTL
From module . . . . . . . . : QJVAUTLJVM
From procedure . . . . . . : JvaSendMsg
Statement . . . . . . . . . : 4
To module . . . . . . . . . : SQL2JXLC
To procedure . . . . . . . : SQL2JXLC
Statement . . . . . . . . . : 9200
Message . . . . : Error detected while running java in batch mode.
Cause . . . . . : An error was detected while running java in batch. The
reason code is 3. The errno is 3489. The reason codes are described as
follows: 1 -- Failed to create pipe for output. 2 -- Failed open of batch
STDIN null file. 3 -- Failed spawn of child process. 4 -- Failed to allocate
a read buffer. Recovery . . . : If the reason code is 3, use the WRKSBSD
command to change the maximum jobs allowed. Otherwise, report the problem
using the Analyze Problem (ANZPRB) command.

The relevant part being: "3 -- Failed spawn of child process." which means this was running in a job queue or subsystem that only allowed 1 job at a time (i.e. single-threaded).

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /

On 3/3/2010 1:52 PM, Dan Kimmel wrote:
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

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.

Job . . : STRCWPNEP User . . : DKIMMEL Number . . . :


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:

Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure HSSF_OPEN in program UTLIB/HSSFR4
Java exception "java.io.FileNotFoundException: Permission denied.
/J/Accounting/FRG/ICG/Product Master Maint Template.xls" when calling
"<init>" with signature "(Ljava.lang.String;)V" in class

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?

*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 at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.