The moose likes JDBC and Relational Databases and the fly likes embedded derby - doesn't start automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "embedded derby - doesn Watch "embedded derby - doesn New topic

embedded derby - doesn't start automatically

bill steve

Joined: Feb 22, 2011
Posts: 7
If i start the derby database manually inside netbeans, my java desktop app works. if not, i get an sql 8001 reason code 4000 - connection refused. From the Apache docs, it seems that it should start automatically. I quote:

Load the Embedded JDBC Driver
The SimpleApp application loads the Derby Embedded JDBC driver and starts Derby up with this code:

i think i'm doing code is below. Anybody have any thoughts?

moderator: added code tags
Andrey Kozhanov
Ranch Hand

Joined: Mar 12, 2010
Posts: 79
I suppose the problem is in your dbName. 'url' parameter in DriverManager.getConnection method should be of the form 'jdbc:subprotocol:subname', but in your case it is 'jdbc:subprotocol:something:something'.
I agree. Here's the link:
subject: embedded derby - doesn't start automatically
It's not a secret anymore!