RPGMAIL emailing errors out
Posted: Mon May 08, 2023 1:51 pm
Hello,
In a new API (part of apache server configuration), using RPGMAIL to send email.
When testing the API through POSTMAN, email process errors out with RNX0301 while calling RPGMailConstructor.
Any thoughts on why is it occurring or anyone came across this error and how to resolve it?
The error occurs in below module:
//--------------------------------------------------------------------------------------------
// @Author: Aaron Bartell
// @Created: 07/07/2003
// @Descr: This will create a new RPGMail Java object by calling the RPGMail
// constructor.
// @Usage: RPGMail_new()
//--------------------------------------------------------------------------------------------
P RPGMail_new b export
D RPGMail_new pi o class(*java: RPGMail)
D error ds likeds(Error_Info) inz
/free
monitor;
return RPGMailConstructor();
on-error *All;
error = Error_catch();
Error_throw(
'RPGMAIL101': 100: 'RPGMail_new': error.code + ': ' + error.text);
endmon;
/end-free
P e
Adding error details below from joblog:
Java exception received when calling Java method.
*******RPGMAIL101███À██RPGMail_new ██RNX0301 :
Additional Message Information
Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 05/08/23 Time sent . . . . . . : 08:44:49
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure RPGMAIL_NE in program RPGMAIL/RPGMAILSV
received Java exception "java.lang.NoClassDefFoundError:
com.mowyourlawn.rpgmail.RPGMail" when calling method "<init>" with signature
"()V" in class "com.mowyourlawn.rpgmail.RPGMail".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Technical description . . . . . . . . : If the exception indicates that the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the return
type and parameter types match. You can determine the signatures for all the
methods in class XYZ using command QSH CMD('javap -s XYZ').
Thank you!
In a new API (part of apache server configuration), using RPGMAIL to send email.
When testing the API through POSTMAN, email process errors out with RNX0301 while calling RPGMailConstructor.
Any thoughts on why is it occurring or anyone came across this error and how to resolve it?
The error occurs in below module:
//--------------------------------------------------------------------------------------------
// @Author: Aaron Bartell
// @Created: 07/07/2003
// @Descr: This will create a new RPGMail Java object by calling the RPGMail
// constructor.
// @Usage: RPGMail_new()
//--------------------------------------------------------------------------------------------
P RPGMail_new b export
D RPGMail_new pi o class(*java: RPGMail)
D error ds likeds(Error_Info) inz
/free
monitor;
return RPGMailConstructor();
on-error *All;
error = Error_catch();
Error_throw(
'RPGMAIL101': 100: 'RPGMail_new': error.code + ': ' + error.text);
endmon;
/end-free
P e
Adding error details below from joblog:
Java exception received when calling Java method.
*******RPGMAIL101███À██RPGMail_new ██RNX0301 :
Additional Message Information
Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 05/08/23 Time sent . . . . . . : 08:44:49
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure RPGMAIL_NE in program RPGMAIL/RPGMAILSV
received Java exception "java.lang.NoClassDefFoundError:
com.mowyourlawn.rpgmail.RPGMail" when calling method "<init>" with signature
"()V" in class "com.mowyourlawn.rpgmail.RPGMail".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Technical description . . . . . . . . : If the exception indicates that the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the return
type and parameter types match. You can determine the signatures for all the
methods in class XYZ using command QSH CMD('javap -s XYZ').
Thank you!