db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Harrigan" <david.harri...@orange-ft.com>
Subject derby.system.home not being honoured!
Date Thu, 21 Sep 2006 09:24:13 GMT

Thanks to all that helped out in my other question,
re: gui tools.

I have another, more serious problem.

I'm trying to access a database from within a unit
test from within eclipse.

I'm invoking my class under test and in that class
I have:

System.setProperty("derby.system.home", getDerbySystemHome());
connection = DriverManager.getConnection("jdbc:derby:searchdb",

The getDerbySystemHome() returns a directory that is inside 
the project directory within eclipse, (projectname/web/WEB-INF/classes/)
yet I continuously get this error when I try to execute the test:

EmbedSQLException : Database 'searchdb' not found.

If I change the connection string to:


It creates the database, but at the ROOT of the eclipse project! i.e.,


My question is this, why is Derby not honouring the derby.system.home
that I am explicitly setting in the System properties and then
passing into the DriverManager...


This email and the files transmitted with it are meant solely for the use of the individual
addressee(s) named above. They may contain confidential and/or legally privileged information.
If you are not the addressee(s) or responsible for delivery of the message to the addressee(s),
please delete it from your system and contact the sender right away. The opinions, conclusions
and other information in this message which do not relate to the official business of Orange
Home UK plc are not necessarily endorsed by it. Orange Home UK plc has taken steps to ensure
that this email and any attachments are virus-free, but it remains your responsibility to
confirm and ensure this.

Orange Home UK plc is a subsidiary of France Telecom SA. Our registered office is at: Verulam
Point, Station Way, St. Albans, Herts, AL1 5HE, and we are registered in England and Wales,
as Company No. 3014367

View raw message