NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Can't connect to Java DB sample database

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
c3p



Joined: 14 Oct 2014
Posts: 3

PostPosted: Tue Oct 14, 2014 5:51 pm    Post subject: Can't connect to Java DB sample database Reply with quote

I'm new to netbeans, derby and at my first step i bumped into this annoying error:

Unable to Connect. Cannot establish a connection to
jdbc:derby://localhost:1527/sample using org.apache.derby.jdbc.ClientServer
(the connection was refused because the database sample was not foun

Any suggestions ?

I've noticed that sample database lacks service.properties, db.lck files and temp folder. working databases have all these but they are missing in sample database. Copying another databases related files and folders into the sample database leads to different problems ( failed to start database with class loader sun.misc.launcher ).
Back to top
antd



Joined: 10 Jan 2015
Posts: 1

PostPosted: Sat Jan 10, 2015 5:01 am    Post subject: Reply with quote

You use netbeans version of how and what OS you use a computer?
Back to top
andyson



Joined: 27 Mar 2017
Posts: 4

PostPosted: Mon Mar 27, 2017 2:43 am    Post subject: Reply with quote

Thanks for your quick reply..



คาสิโนออนไลน์
Back to top
priya465



Joined: 17 Aug 2017
Posts: 28

PostPosted: Fri Oct 13, 2017 6:35 am    Post subject: Reply with quote

Without seeing code it's hard to guess, but perhaps you need create=true on your connection string.

final String connectionURL = "jdbc:derby:" + dbName + ";create=true";

(I pulled this copy and paste out of an app I have that uses an embedded database.)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo