Sagewire Logo

function in derby[beginner]

2 Message(s) by 2 Author(s) originally posted in java language


From: tony_se Date:   Saturday, March 31, 2007
I have this class :
public class Say {
public static int say(int i) {
System.out.println("* Say: " + i);
return i;
}

public static int say2(String msg) {
System.out.println("** " + msg);
return 1;
}
}

and I created a function in Derby:
create function say2(msg varchar(50)) returns integer
parameter style JAVA no sql language JAVA
external name 'Say.say2';

but when I want to use it, error occurs:
ERROR 42X50: No method was found that matched the method call
Say.say2(JAVA.lang
.String), tried all combinations of object and primitive types and any
possible
type conversion for any parameters the method call may have. The
method might e
xist but it isn't public and/or static, or the parameter types are
not method I
nvocation convertible.

And I created another function:
create function say(i integer) returns integer
parameter style JAVA no sql language JAVA
external name 'Say.say';

It works fine.

I have tried hard to figure it out but failed. Can anybody help me?

Thank you in advance!!!


From: Lew Date:   Saturday, March 31, 2007
wrote in message :
I have this class:
public class Say {
public static int say(int i) {
System.out.println("* Say: " + i);
return i;
}
public static int say2(String msg) {
System.out.println("** " + msg);
return 1;
}
}



Please don't multi-post, that is, send the same message independently to
different newsgroups. It fragments the thread and does not let people see all
the answers to your question.

Instead, cross-post, if you really, really, really must reach multiple groups,
preferably with "followup" set to one of the groups.

Like this reply, cross-posted to alt.comp.lang.JAVA, clj.help,
comp.lang.JAVA.programmer and clj.databases, with f/u set to clj.help.

-- Lew



Next Message: Compiler warning Question



Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional