Hi Flavio,
This is just a guess, but are you shutting down the entire Derby engine
by connecting to the following URL:
DriverManager.getConnection("jdbc:derby:;shutdown=true");
If so, you are removing the embedded driver from the VM's list of
registered drivers and you need to re-install it with the following
statement:
Class.forName(org.apache.derby.jdbc.EmbeddedDriver).newInstance();
Instead of shutting down the entire engine, you may consider just
shutting down your single database:
DriverManager.getConnection("jdbc:derby:sample;shutdown=true");
For more information about this topic, please see
http://db.apache.org/derby/docs/10.5/devguide/devguide-single.html#cdevdvlp27610
and
http://db.apache.org/derby/docs/10.5/devguide/devguide-single.html#cdevdvlp21955
Hope this helps,
-Rick
Flavio Palumbo wrote:
Hi all,
i'trying plug into an application some code derived from ASTParser.
This code is inserted in a single class that does the parsing (say class A).
The parsing can be called many time from a main class that everytime creates
a new class A.
The strange behavior i found is that, the first time i create the class A,
the parsing is done with no problems, while from the second time i get a
"java.sql.SQLException: org.apache.derby.jdbc.EmbeddedDriver is not
registered with the JDBC driver manager" everytime.
This happens when the class executes "Connection conn =
DriverManager.getConnection(CONNECTION_URL);"
I'm sure that everytime the class A is called i shut down the connection
properly.
Can somebody help me to figure out why this happens ?
thanks a lot
Flavio
-----------------------------------------------------------
Il presente messaggio non costituisce un impegno contrattuale tra SILMA S.r.l.
ed il destinatario.
Le opinioni ivi espresse sono quelle dell'autore.
SILMA S.r.l. non assume alcuna responsabilita riguardo al contenuto del
presente messaggio.
Il messaggio รจ destinato esclusivamente al destinatario.
Il contenuto e gli allegati sono da considerarsi di natura confidenziale
Nel caso abbiate ricevuto il presente messaggio per errore siete pregati di
comunicarlo
alla casella [email protected].