× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If there's a QSH shell being invoked as another job (or thread) it'll
run under the same user profile as the job invoking it.

The message this time doesn't show any of that. It just says it can't
find the file. That implies there's either an error in the path or
there's a permissions error.

The archive message thread was from V4Rx. With V5Rx, the jvm runs in a
thread in the same job as the RPG program that calls it. You can verify
this by looking at WRKJOB option 20. You should see something like this:

Work with Threads

System:
RJS4003
Job: STRCWPNEP User: DKIMMEL Number: 332790



Type options, press Enter.

3=Hold 4=End 5=Display attributes 6=Release 10=Display call
stack
11=Work with thread locks 14=Work with thread mutexes



Total Aux Run

Opt Thread Status CPU I/O Priority

00000AF3 TIMW 2.858 3540 56

00000AF5 JVAW .000 1 53

00000AF4 JVAW .000 6 51








-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Dow
Sent: Wednesday, March 03, 2010 6:34 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Using HSSF POI to open file in QNTC

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

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




--
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-Ups:
Replies:

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

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.