This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "embedded derby - doesn Watch "embedded derby - doesn New topic
Author

embedded derby - doesn't start automatically

bill steve
Greenhorn

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 this...........my 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: http://aspose.com/file-tools
 
subject: embedded derby - doesn't start automatically