NetBeans Forums

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

Not able to connect to a Derby database on the Services tab on Netbeans 6.8

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



Joined: 19 Feb 2010
Posts: 15

PostPosted: Thu Apr 08, 2010 9:51 am    Post subject: Not able to connect to a Derby database on the Services tab on Netbeans 6.8 Reply with quote

Hi All,

Whenever I try to connect to a Derby database through the embedded Derby driver on the Services tab of the Netbeans IDE, I get the following error:

"Unable to add conection. Cannot establish a connection to jdbc:derby:mydatabasename using org.apache.derby.jdbc.EmbeddedDriver (Database 'mydatabasename' not found.)."

I have ensured that the correct database location is specified in the "Java DB Properties" dialog box that is accessed by right-clicking the "Java DB" node under the Services tab.

I would be grateful for any help that you can offer in this regard.

Regards,
Dinesh Bajaj
Back to top
javydreamercsw



Joined: 22 Jun 2009
Posts: 488

PostPosted: Thu Apr 08, 2010 12:01 pm    Post subject: Not able to connect to a Derby database on the Services tab on Netbeans 6.8 Reply with quote

Did you make sure the Java DB server is running? Services>Database>Java DB>Start Server

On Thu, Apr 8, 2010 at 4:51 AM, jaihind <address-removed ([email]address-removed[/email])> wrote:
Quote:
Hi All,

Whenever I try to connect to a Derby database through the embedded Derby driver on the Services tab of the Netbeans IDE, I get the following error:

"Unable to add conection. Cannot establish a connection to jdbc:derby:mydatabasename using org.apache.derby.jdbc.EmbeddedDriver (Database 'mydatabasename' not found.)."

I have ensured that the correct database location is specified in the "Java DB Properties" dialog box that is accessed by right-clicking the "Java DB" node under the Services tab.

I would be grateful for any help that you can offer in this regard.

Regards,
Dinesh Bajaj




Back to top
emiddio



Joined: 07 Sep 2009
Posts: 233

PostPosted: Thu Apr 08, 2010 5:23 pm    Post subject: Not able to connect to a Derby database on the Services tab on Netbeans 6.8 Reply with quote

you connect to an existing database -- sounds like you have not created the database yet.

gary

Quote:
----- Original Message -----
From: Javier Ortiz ([email]address-removed[/email])
To: address-removed ([email]address-removed[/email])
Sent: Thursday, April 08, 2010 5:01 AM
Subject: [nbusers] Re: Not able to connect to a Derby database on the Services tab on Netbeans 6.8


Did you make sure the Java DB server is running? Services>Database>Java DB>Start Server

On Thu, Apr 8, 2010 at 4:51 AM, jaihind <address-removed ([email]address-removed[/email])> wrote:
Quote:
Hi All,

Whenever I try to connect to a Derby database through the embedded Derby driver on the Services tab of the Netbeans IDE, I get the following error:

"Unable to add conection. Cannot establish a connection to jdbc:derby:mydatabasename using org.apache.derby.jdbc.EmbeddedDriver (Database 'mydatabasename' not found.)."

I have ensured that the correct database location is specified in the "Java DB Properties" dialog box that is accessed by right-clicking the "Java DB" node under the Services tab.

I would be grateful for any help that you can offer in this regard.

Regards,
Dinesh Bajaj






Back to top
Javier.Ortiz
Posted via mailing list.





PostPosted: Thu Apr 08, 2010 5:32 pm    Post subject: Not able to connect to a Derby database on the Services tab on Netbeans 6.8 Reply with quote

Also you can also create it if not created using:

jdbc:derby:mydatabasename;create=true

Javier A. Ortiz Bultr
Back to top
jaihind



Joined: 19 Feb 2010
Posts: 15

PostPosted: Fri Apr 09, 2010 4:52 am    Post subject: Reply with quote

Hi Folks,

Thanks to all of you for your replies.

The database is already created, and I am able to access it through my Java application without any problem. Also, I ensure to start the Java DB server prior to try connecting to the database through the Services tab.

If this may help to tell that the system is 64-bit. I have no issues connecting to the database through the Services tab on a 32-bit system.

Thanks again in anticipation of your further assistance.
Back to top
jaihind



Joined: 19 Feb 2010
Posts: 15

PostPosted: Fri Apr 09, 2010 6:07 am    Post subject: Reply with quote

Never mind. I have managed to establish the connection to the database using the DB Network driver (though the Database server and the database are located on the same system.)

It is that the Netbeans can't establish the connection using the Embedded driver? If yes, then for educational purpose I would be interested in knowing why is it so.
Back to top
markwade



Joined: 04 Dec 2010
Posts: 342

PostPosted: Thu Mar 02, 2017 5:40 pm    Post subject: Re: Not able to connect to a Derby database on the Services tab on Netbeans 6.8 Reply with quote

I understand the following was posted years ago but in the interest of anyone arriving here from an internet search as I did I'm going to post a response.

It was suggested that JavaDB should be already started, this is not so when using the embedded driver, in fact it should not be.

Either you have to specify the complete path of the database url:jdbc:derby:/complete/path/to/database, so in the connection wizard enter:

/complete/path/to/database

or

append a Java system property to "netbeans_default_options" in netbeans.conf in your NetBeans installation etc directory. In my case:

-J-Dderby.system.home=/home/markw/.netbeans-derby

Then in the connection wizard it is only necessary to enter the database name.

Sorry if that's lame, just thought maybe it might help someone sometime.

jaihind wrote:
Hi All,

Whenever I try to connect to a Derby database through the embedded Derby driver on the Services tab of the Netbeans IDE, I get the following error:

"Unable to add conection. Cannot establish a connection to jdbc:derby:mydatabasename using org.apache.derby.jdbc.EmbeddedDriver (Database 'mydatabasename' not found.)."

I have ensured that the correct database location is specified in the "Java DB Properties" dialog box that is accessed by right-clicking the "Java DB" node under the Services tab.

I would be grateful for any help that you can offer in this regard.

Regards,
Dinesh Bajaj


jaihind wrote:
Never mind. I have managed to establish the connection to the database using the DB Network driver (though the Database server and the database are located on the same system.)

It is that the Netbeans can't establish the connection using the Embedded driver? If yes, then for educational purpose I would be interested in knowing why is it so.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans 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