You need to reimport your jar containing the procedure definition? On Sun, May 11, 2008 at 9:28 PM, Tian TAN <[EMAIL PROTECTED]> wrote:
> Hi all, > > I am new to derby and I recently encountering the following problem, > can someone help (by explaining a bit or pointing me to some doc)? > > Environment > I am running derby server using eclipse plugin, and issuing the SQL through > ij. > > Step 1 > > connect 'jdbc:derby://localhost:1527/testDB;create=true;'; > > CREATE PROCEDURE testPrint ( ) > MODIFIES SQL DATA > PARAMETER STYLE JAVA > LANGUAGE JAVA > EXTERNAL NAME 'derbylab.TestProcedure.print' -- print 'AAA' in the Java > class > ; > > CALL testPrint(); > > Statement executed correctly and prints out 'AAA. > > Step 2 > Then I changed the print 'AAA' in the Java class to print 'BBB' and execute > > connect 'jdbc:derby://localhost:1527/testDB;create=true;'; > > DROP PROCEDURE testPrint; > CALL testPrint(); -- make sure it's dropped. No surprise ERROR 42Y03 > Procedure not found. > > CREATE PROCEDURE testPrint ( ) > MODIFIES SQL DATA > PARAMETER STYLE JAVA > LANGUAGE JAVA > EXTERNAL NAME 'derbylab.TestProcedure.print' > --- now I expect it to print 'BBB', since I've changed the Java class > ; > CALL testPrint(); > Statement executed but still prints out 'AAA' instead of 'BBB'. > > This is a bit surprise to me. I noticed that in between step 1 and > step2 if I restart derby network server the result is correct. So it > seems to me that the testPrint PROCEDURE is cached and not dropped? > (i.e. if the exact same testPrint PROCEDURE is recreated the old > cached version will be called). > > Could someone help? (or pointing me to some online doc or some source > code I should look? ) Thanks. > > Tim >
