RPG Calling Java

pts.
Tags:
AS/400
DataCenter
RPGLE
Hi, We have an RPG program making a Java call several times in a job. The Java call fails after certain number of calls and the number of calls is fixed. In one of the systems we noticed that the number of calls to the Java method after which the job abends is 262141. Is there any system parameter for the number of Java calls possible for a particular job. Also could this be because several instaces of the JVM being created and results in no new instance to be created (Lack of Garbage collection). Is there a way to know these details. The details of the error message we get To module . . . . . . . . . : QJVAJNI To procedure . . . . . . . : FindClass Statement . . . . . . . . . : 1 Message . . . . : Java program threw an exception. Cause . . . . . : An exception was sent from within a Java program. The Java exception object reference -2143288700 identifies the Java throwable object that further describes the exception. The exception was thrown in a thread attached to Java Virtual Machine -1259697824. Recovery . . . : This exception can be handled only within the Java Virtual Machine environment. If this exception causes a Java application to end, report the problem to the person responsible for maintaining that application. Technical description . . . . . . . . : Correct the cause of the exception or add an appropriate "catch" clause to the Java program at the point where the exception occurs. _______________________________________________________ 50 11/11/06 00:24:16.518736 QRNXIE QSYS *ST From module . . . . . . . . : QRNXMSG From procedure . . . . . . : SignalException Statement . . . . . . . . . : 21 To module . . . . . . . . . : SLPB479 To procedure . . . . . . . : SLPB479 Statement . . . . . . . . . : 85 Message . . . . : Java exception received when calling Java method. Cause . . . . . : RPG procedure SLPB479 in program DIPOLIB/SLPB479 received Java exception "UnknownError " when calling method "conditionValidator" with signature "(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Lj ava.lang.String;Ljava.lan" in class "walgreens.acplan.job.ConditionValidatorJob". 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').

Answer Wiki

Thanks. We'll let you know when a new response is added.

Well this seems like a true question for Rochester support, however you could make the RPG program get called within a CL and the monitor for the error such that you loop back up and call the RPG program again.

On the other hand when we dealt with extensive calls to other programs especially for processes that were called from web based applications we made extensive use of the RPG exception/error handling routines. Java also has exception handling routines. The java processes need to be defined as procedures such that their exception/error routines pass back error information to the calling program this allows you start a new instance of the java procedure when necessary. The people at Rochester support can direct you to some good white papers and some redbooks dealing with the subject.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    You don't tell anything about what operating system version/release you're running, what Java version you're using, what Java group PTF level you're at nor even what Java error is happening. No Java source from the failing class to review... If your Java programming is not communicating its problems back to your RPG, there is nothing that we can learn from the RPG portion of the job. The only thing we can tell from the message you show is that the exception happened in class walgreens.acplan.job.ConditionValidatorJob. (Technically, I guess we can also tell that that class isn't properly catching and handling exceptions.) There is a possible clue from which some sense can be made -- failing after 262141 calls. There's no way from what we know to tell if it's significant or not. It's simply suspicious that it falls so close to the binary boundary of 262144 (4*256*256). If there was a hint of source code to go with, hopefully from the point of failure, it might even be explained. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following