Hello,
can't find the reason for the following issue:
(Derby 10.5.3.0 network server running on a Linux server, the java function has
been loaded into the database as part of a jar file, server running without
security policy).
When trying to call a procedure from a java program I am getting error '.. is
not recognised as a function or procedure'.
I used the exact same connection URL as used in the java program in IJ to
connect to the database and executed a 'values APPL."myFunction"("parm1",
"parm2")' and the call executed fine returning the expected result.
So I would conclude the procedure exists in that schema on the server.
In the program I used
CallableStatement cs = conn.prepareCall("{ call APPL.\"myFunction\"(?, ?) \n}");
cs.registerOutParameter(1, java.sql.Types.VARCHAR);
cs.setString(1, parm1);
cs.setString(2, parm2);
which lead to 'APPL.myFunction' is not recognised as a function or procedure.
Commenting out the CallableStatement and issuing **from within the same program
(leaving driver, connectionURL untouched) ** a preparedStatement doing a "select
ALIAS FROM SYS.ALIASES \n" I can see that my Function exists.
I am passing the correct number of parameters. It can't be a classpath problem
as the java code is stored in the database. I am specifying the correct schema
name. When using eclipse data tools platform data explorer to connect to
database I can browse the system catalog and see the procedure...
So what else should I check??
Thanks