|
Hey guys, first of all I apologize for the cross-post, but I wasn't sure where I should post this question... And sorry about the length. I am working on linking RPG and java programs together. I have written a couple modules, one for each class I am interfacing. They both seem to work just fine except for one method. I keep getting: Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50 Message type . . . . . : Escape Date sent . . . . . . : 12/12/03 Time sent . . . . . . : 14:40:56 Message . . . . : Java exception received when calling Java method. Cause . . . . . : RPG procedure DOCP_UPLOA in program PDFPGMSNEW/F.DOCPROC received Java exception "java.lang.NoSuchMethodError: UploadFile" when calling method "UploadFile" with signature "(Lcom.taylor.docgate.Docfile;Ljava.lang.String;Ljava.lang.String;)Ljava.lan g.Boolean;" in class "com.taylor.docgate.Docprocess". 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'). Now I can call other methods in the class just fine, and I have recompiled several times. Below is the code I am using. I have talked to our java programmers and some others who I know deal a bit with java and no one can seem to find my signature error. DocP, String, and DocFile are defined as constants for the appropriate class, so 'String' is 'Const('java.lang.String')'. This is my subprocedure: P*-------------------------------------------------- P* Procedure name: DocP_UploadFile P* Purpose: Upload a file to DocuShare P* Returns: P* Parameter: Document => Core DocuShare document information P* Parameter: AuthToken => Autority Token P* Parameter: URL P*-------------------------------------------------- PDocP_UploadFile B EXPORT DDocP_UploadFile PI D objDocP O Class(*Java: DocP) D Document O CLASS(*JAVA:DocFile) D CONST D AuthToken O CLASS(*JAVA:String) D CONST D URL 500A CONST D OPTIONS(*VARSIZE) D uploadDoc PR O ExtProc(*Java: DocP: 'UploadFile') D Class(*Java: 'java.lang.Boolean') D Doc O Class(*Java: DocFile) Const D AuthToken O Class(*Java: String) Const D URL O Class(*Java: String) Const D boolean S O Class(*Java: 'java.lang.Boolean') /FREE monitor; boolean = uploadDoc(objDocP: Document: AuthToken: #cvtToString(URL)); return; on-error *all; return; endmon; /END-FREE PDocP_UploadFile E And this is my java method: Public boolean UploadFile(Docfile objDocFIle, String authToken, String url) throws DocgateException{ return objDocgateDAO.UploadFile(objDocFIle,authToken,url); } If you see anything wrong or have any other ideas. Please let me know. I am starting to loose hair over this. Mike Wills Lawson Programmer/Administrator Taylor Corporation Email: mnwills AT taylorcorpNOSPAM DOT com AIM: iSeriesCodePoet
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.