|
We are experiencing this weird problem: - If we start our application from the QShell command line (java <classname> <args>), then the application logs correctly to the log file (the logging takes place by way of a RandomAccessFile.writeBytes) - If we start our application by way of calling a CL program, which, on its turn executes RUNJVA CLASS(<classname>) ... then logging does not occur! That is, the problem occurs only when the Java program gets started from within its CL wrapper, not when it gets started ?bare? from the command line. There were no such problem till we upgraded our iSeries from V5R1 to V5R3 (the Java version used by the application was also upgraded from 1.2.2 to 1.3.1). Any ideas? Following is the source of the program that makes the RUNJVA call: ============================================= /* The program binds some intefaces to the already started rmiregistry on the AS400.*/ PGM PARM(&PORT) /* DECLARE VARIABLES */ DCL VAR(&RATESCONT) TYPE(*CHAR) LEN(20) DCL VAR(&PORT) TYPE(*CHAR) LEN(4) DCL VAR(&USRID) TYPE(*CHAR) LEN(10) DCL VAR(&PASSWD) TYPE(*CHAR) LEN(10) /* CHANGE WORKING DIRECTORY FOR ALL JAVA PROGRAMS CALL */ CD DIR('/JAVAAPPS') /* Retrieve UserID & Password combination from Data Area,necessary for class call */ RTVDTAARA DTAARA(RATES (1 20)) RTNVAR(&RATESCONT) /* GET UserID from Data Area content - Positions 1-10 */ CHGVAR VAR(&USRID) VALUE(%SST(&RATESCONT 1 10)) /* GET Password from Data Area content - Positions 11-20 */ CHGVAR VAR(&PASSWD) VALUE(%SST(&RATESCONT 11 10)) /* Change Run priority to 70 to ensure that JVM runs with a low priority */ CHGJOB RUNPTY(70) /* Override console output to a wider record output file, because */ /* we don't want to lose any exception listing information */ OVRPRTF FILE(QPRINT) PAGESIZE(66 378) CPI(15) + FOLD(*YES) SAVE(*YES) USRDTA(JVACONSL) OVRSCOPE(*JOB) IF COND(&PORT *EQ '*DFT') THEN(RUNJVA + CLASS(<classname goes here>) + PARM(&USRID &PASSWD) CHKPATH(*IGNORE) + PROP((os400.stderr + 'file:/JAVAAPPS/SRVCLASS_ErrorLog.doc') + (os400.stdio.convert 6) (file.encoding + 1253) (os400.stdout + 'file:/JAVAAPPS/SRVCLASS_Console.doc'))) ELSE CMD(RUNJVA + CLASS(<classname goes here>) + PARM(&USRID &PASSWD &PORT) + CHKPATH(*IGNORE) + PROP((os400.stderr + 'file:/JAVAAPPS/SRVCLASS_ErrorLog2.doc') + (os400.stdio.convert 6) (file.encoding + 1253) (os400.stdout + 'file:/JAVAAPPS/SRVCLASS_Console2.doc'))) ENDPGM Thanks!
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.