I'm trying to use XMLSERVICE/itoolkit to call RPG that calls Java. My JVM crashes immediately on startup. Has anyone seen this/have a work-around? I have created a simple test case that can replicate the issue.

RPGLE:
//--------------------------------------------------
// Procedure name: stringConstructor
// Purpose: Java String constructor
// Returns: Java String object
// Parameter: bytes => RPG character variable
//--------------------------------------------------
Dcl-pr stringConstructor object(*java : 'java.lang.String')
extProc(*java : 'java.lang.String' : *constructor) ;
bytes varchar(9999) const ;
End-pr;

//----------------------------------------------------------------------
// stand-alone fields
//----------------------------------------------------------------------
Dcl-s javaString object(*java : 'java.lang.String') ;

//-----------------------------------------------------------------------

javaString = stringConstructor('A');
javaString = *null;

*inLR = *on;
Return;


Python:
from itoolkit import iCmd, iData, iPgm, iToolKit
from itoolkit.db2.idb2call import iDB2Call

itransport = iDB2Call()
itool = iToolKit()

itool.add(iPgm('my_key', 'STRJVM', {'lib':'QGPL'}))

itool.call(itransport)


Cross-post to MIDRANGE-L & Ryver.

TIA

This thread ...

Follow-Ups:

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

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