Reputation: 71
I installed NetBeans 8.0.2 with glassfish-4.1. The sample folder is present under C:\Users\Username.netbeans-derby. When I bring up NetBeans and go to the Services tab the connection to sample is present: jdbc:derby://localhost:1527/sample [app on APP] but sample is not listed under Java DB so when I try to connect to sample I get the following error "Unable to connect. Cannot establish a connection to jdbc:derby://localhost1527/sample using org.apache.derby.jdbc.ClientDriver (The connection was refused becuase the database sample was not found)."
Upvotes: 1
Views: 4645
Reputation: 1796
The same thing happened to me and re-installing NetBeans did not help. After poking around the databases for a bit, I finally got mine working using the following process.
A couple extra notes:
Upvotes: 0
Reputation: 1
I had a broken database from an earlier version too, and then couldn't connect to the sample db. I simply had to delete the .netbeans-derby directory, then reinstalled Netbeans, and is was ok, then.
Upvotes: 0
Reputation: 22983
Right click on Java DB
select Create Database
.
Database Name
'sample'User Name
'app'edit
Seems there is a broken database or maybe one from an earlier Netbeans installation. Remove the sample
connection in Netbeans and remove the directory %USERPROFILE%\.netbeans-derby\sample
. Recreate the sample
database as described above.
Upvotes: 0