On Tuesday 11 October 2005 01:56, Xavier Vigouroux wrote: > Le 10 oct. 05, à 19:05, Kathey Marsden a écrit : > > Xavier Vigouroux wrote: > >> Hi, > >> > >> I have a transient priviledgeException when connection to the DB with > >> ij. > >> > >> here is the scenario: > >> > >> 1/ I start an embeddedServer > >> 2/ wait for the ping() be ok (tested in the JVM creating the server) > >> 3/ start ij to create a schema. > >> > >> then in 4, I get a transient error...i.e if I retry it works. > >> > >> what should I wait for to be sure the server is ready to recieve cmd? > > > > I have not been following this thread closely, and perhaps this has > > been > > covered, but I was wondering what is step 4 doing and what is the > > error and what is the transient error and stack trace that you get? > > in fact step 4 is step 3 (I did an error): and starting to create a > schema means > ooening a connection with "create=true". > Ok,
But that shouldn't cause an error or even throw an exception. If the database already exists and you open a connection to that database with CREATE=TRUE, then you will only get a warning message. And that isn't even thrown. Well, maybe I shouldn't say that..... There could be a bug ... I'm working with Derby using the embedded framework and in my application, I have a -init command line option. Here I open the connection with CREATE=TRUE and then check the warnings. If I get a warning, then I know the database already exists in some state. I then go to the SYS.SYSTABLE (joined with the SYS.SYSSCHEMA table) to get all the existing tables in the schema and then drop them. (Then the schema too). After this clean up, I call my initDB method that creates the schema and tables. This works for me, although I'm doing this within a java program and not a shell script. > concerning the stack, the execption is is the call to openConnection > OK, If you try my little program, it should solve this. -- Michael Segel Principal MSCC (312) 952-8175
