[Pljava-dev] ERROR: Unable to find static method Active.executeService with signature (Ljava/lang/Integer; Ljava/lang/String; Ljava/lang/Integer; )I

Thomas Hallgren thomas at tada.se
Wed Mar 29 05:33:42 UTC 2006


Hi Claudio,
You must put your class in a package.

Kind Regards,
Thomas Hallgren

claudio ferraz wrote:
>
> I am having problem defining functions. Im a new user of Pljava and my 
> code is the following one:
>
> Function Definition:
>
> CREATE OR REPLACE FUNCTION execute_service(int4, text, int4)
>   RETURNS int4 AS
> 'Active.executeService(java.lang.Integer,java.lang.String,java.lang.Integer)'
>   LANGUAGE 'java' VOLATILE;
> ALTER FUNCTION execute_service(int4, text, int4) OWNER TO postgres;
>
> My Java Class:
> public class Active {
>     public static int executeService(int serviceId, String dewey,int 
> docId  ) {
>         try{
>             GerenteServicos gs = new GerenteServicos();
>             gs.prepairService (serviceId,dewey,docId);
>             return 1;
>         }catch(Exception e){
>             return 0;
>         }
>        
>     }
> }
>
> My function call :
>
> select execute_service(1,'1',1);
>
> My error:
> ERROR:  Unable to find static method Active.executeService with 
> signature (Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;)I
>
> Sorry my poor english e I hope that somebody help me!!!
> Thanks a lot!!!
> -- 
> Cláudio A. Ferraz - Analista de Sistemas
> "Se não puder fazer tudo, faça tudo o que puder."
> "Niguém é rico o suficiente para não poder ser ajudado, ninguém é 
> pobre o suficiente para não poder ajudar."
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>   




More information about the Pljava-dev mailing list