By placing that try block into ASTParser.execute(), you're arranging it
so that this line always gets run at the end of execute():

DriverManager.getConnection(SHUTDOWN_URL);

This line is shutting the Derby system down, and it means that the
next time you try to run the parser, you get the exception about
Derby being already shut down.

I'm not sure why ASTParser.execute() is shutting the Derby system down;
that seems like an odd location for that code.

Did you write ASTParser.java? Or is that part of the Derby code?

I suggest seeing if you can place the shutdown code into a separate
method on ASTParser, and arrange to call it only once, at the end of
your work with the parser.

thanks,

bryan

Reply via email to