On 9/4/2012 6:12 AM, Kristian Waagan
On 04.09.2012 00:33, Rainier Diaz Ferrer wrote:
Are you starting Network Server with the NetworkServerControlControl
API in the same JVM? If so,
Hello Derby team, my name is Rainier, i'm having
problems trying to connect to my derby database using network
server. I set the derby home directory by using this.
this code line goes right before starting the server. When i
try to connect it throws a database not found exception, if i
copy the database to the current directory, where my
application is executing from, it works fine, but i want it to
find my database somewhere else, which is in
mylocalpathtoderbydb, set as derby.system.home. i would
appreciate an answer. Thank you. Rainier
Depending on how the driver is loaded, the property may be set too
You can try to set the property as a system property on the
command line, or to specify it in derby.properties in your current
working directory to verify that theory.
I believe as a work around you can deregister the autoloaded driver
by shutting down Derby, e.g.
DriverManager.getConnection("jdbc:derby:;shutdown=true") and then
set your system property and restart Derby with Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance().
If you are launching a separate process, pass the system property on
the command line as Kristian suggests.