db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Briggs <acidbri...@gmail.com>
Subject Installing and Using Java Procedures.
Date Thu, 24 Jan 2008 20:57:57 GMT
I'm having a bit of a problem installing a java procedure in derby
(10.3).  I thought I understood what I could do with them but now...

I have created a simple "hello world" procedure:

--------------

package derby.proc;

public class HelloWorldProcedure {
   public static String helloWorld(final String name) {
      return "hello " + name;
   }
}

--------------

Then created a jar file called DerbyProcs.jar in my temp directory
(with the above class).

Then I run the following commands:

CALL SQLJ.install_jar('c:\tmp\DerbyProcs.jar', 'APP.DERBY_PROCS', 0);

CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath','APP.DERBY_PROCS');

CREATE PROCEDURE APP.HELLO_WORLD(
   IN NAME VARCHAR(20),
   OUT HELLO_YOU VARCHAR(30)
)
PARAMETER STYLE JAVA
READS SQL DATA
LANGUAGE JAVA
EXTERNAL NAME  'derby.proc.HelloWorldProcedure.helloWorld';


-- CALL THE PROC

CALL APP.HELLO_WORLD('world');


The result I get is:

Error code 30000, SQL state 42Y03: 'APP.HELLO_WORLD' is not recognized
as a function or procedure.
Line 13, column 1


What am I missing? Am I wrong on what I am expecting to happen?

Thanks for your time,

Briggs.

-- 
"Conscious decisions by conscious minds are what make reality real"

Mime
View raw message