× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks guys!!! Defining it as 'N' worked. That is really confusing.

Mike Wills
Lawson Programmer/Administrator
Taylor Corporation
Email: mnwills AT taylorcorpNOSPAM DOT com
AIM: iSeriesCodePoet


-----Original Message-----
From: Scott Klement [mailto:klemscot@xxxxxxxxxxxx] 
Sent: Friday, December 12, 2003 5:04 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Java/RPG problem, I need help solving.


Remember a month or two ago when I was saying that overloading causes hard
to figure out errors?

The error that Java is sending you is "java.lang.NoSuchMethodError:
UploadFile"  but the actual problem isn't that it can't find the method, but
rather that your prototype doesn't match the Java method definition.

Since the return value of your UploadFile() routine is "boolean" (a java
primitive) and the RPG prototype references "java.lang.Boolean"
(an object) they are not the same type.   Because Java does overloading,
when the return types or parameters do not match, you get the error
"NoSuchMethod"

At any rate, the fix is to either change your Java method to return an
object of type java.lang.Boolean, or to change your RPG prototype to have a
return value of type "N" (indicator)

Hope that helps...

On Fri, 12 Dec 2003, Wills, Mike N. (TC) wrote:
[SNIP]
> 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".
[SNIP]
>      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
[SNIP]
> Public boolean UploadFile(Docfile objDocFIle, String authToken, String 
> url) throws DocgateException{
>    return objDocgateDAO.UploadFile(objDocFIle,authToken,url);
> }
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.