Hi,
Following is my java code for UDF .

public class Sample3 extends COM.ibm.db2.app.UDF
{

public Sample3() {

}
public void smsg1 (int result)
throws Exception {
set(1,1);

}
}

I have registered this as
C:\>db2 create function send1 () returns int not fenced variant no sql external action language java parameter style db2general final call disallow parallel dbinfo external name 'Sample3.smsg1'

Now when I run SQL " c:> db2 values(send1())" I am getting following error :

-----------
SQL4304N Java stored procedure or user-defined function "DB2ADMIN.SEND1",specific name "SQL030801013041400" ould not load Java class "Sample3", reason code "2". SQLSTATE=42724

Reason code 2 means :
The class did not implement the required interface ("COM.ibm.db2.app.StoredProc" or "COM.ibm.db2.app.UDF") or lacked the Java "public" access flag.

But I have exteneded the UDF and also used public access flag..

Could someone Please tell me the error ? I have also put the class file in sqllib\function directory.

Regards,
Ajay