db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Derby Stored Procedure Help!
Date Tue, 14 Apr 2009 13:25:17 GMT
sivagururaja wrote:
> Hello Mr.Rick,
> Normally, database procedures use the special server-side connection url:
> "jdbc:default:connection".
> I tried this one,
> Connection conn = DriverManager.getConnection("jdbc:derby:sample"); //sample
> is my database without uname and passwd
> Error: Database 'sample' is not found.
> Can you please help me.:-)

This is the error you see when your database does not exist in the 
expected directory. That connection url tells Derby to look for a 
subdirectory named "sample". This is supposed to be a subdirectory of 
the top level directory identified by the system property 
"derby.system.home" (if your application does not set that property, 
then derby.system.home defaults to the current directory of the VM). I'm 
assuming you haven't set that property. If that is the case, then Derby 
is complaining that the subdirectory named "sample" does not exist in 
the current directory of the VM. Maybe you need to create the database 
(to do that, add ";create=true" to the end of your connection url). Or 
maybe your database lives in some other directory subsystem and you need 
to point derby.system.home at that subsystem.

Hope this helps,

View raw message