My sample program is the one from the http://wiki.apache.org/db-derby/DerbySQLroutines. Additionally, I tried to create and install a jar file to a database.
By the way, what is the correct format of external name in "create procedure"? does the external name include class and method only, or need a jar file name also? And, I wonder if there is a necessary setting, such classpath, indicating the location of the jar file or the class. Because I'm working on the Netbeans. Jean T. Anderson-3 wrote: > > hk wrote: >> I tried to call a sampe stored procedure, but I got an error message >> saying >> >> " Error code -1, SQL state 42X51: The class 'routines_jar:store' does not >> exist or is inaccessible. This can happen if the class is not public. >> SQLSTATE: XJ001: Java exception: 'routines_jar:store: >> java.lang.ClassNotFoundException'. >> Line 3, column 1." >> >> I had made a public class and a public static method, which is called >> "store" and "dropTable" respectively, >> made a jar file, which is called "Javalibrary1.jar", >> and installed the jar file with the sqlj.install_jar using a jar name >> "routines_jar" into a database. >> >> And, then I had createad a stored procedure with external name >> "routines_jar:store.dropTable", which is called "DROP_TABLE", >> and called the stored procedure Drop_TABLE with a parameter. >> >> Then, I got an error message above, which basically is saying "The class >> 'routines_jar:store' does not exist or is inaccessible." I was trying to >> figure out the problem, but stiil I coudn't. >> >> What would be the problem? help me, please. > > > This page on the wiki points to some working examples: > > http://wiki.apache.org/db-derby/DerbySQLroutines > > I wonder if one of them in particular might help -- it's a pointer to a > post that shows how to drop table in a procedure [1]. > > If not, I suggest you post your java code, if that's possible (but don't > post anything proprietary), and the SQL statements you use to create the > procedure and install the jar file in the database. > > regards, > > -jean > > [1] > http://mail-archives.apache.org/mod_mbox/db-derby-user/200510.mbox/[EMAIL > PROTECTED] > > -- View this message in context: http://www.nabble.com/can%27t-call-a-stored-procedure-tf3783664.html#a10714299 Sent from the Apache Derby Users mailing list archive at Nabble.com.
