[英]After Installing NetBeans 8.0.2 with GlassFish 4.1 Cannot Connect to sample Database
I installed NetBeans 8.0.2 with glassfish-4.1. 我在glassfish-4.1上安装了NetBeans 8.0.2。 The sample folder is present under C:\\Users\\Username.netbeans-derby. 示例文件夹位于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)." 当我启动NetBeans并转到“服务”选项卡时,存在与示例的连接:jdbc:derby:// localhost:1527 / sample [APP上的应用],但示例未在Java DB下列出,因此当我尝试连接至示例时我收到以下错误“无法连接。无法使用org.apache.derby.jdbc.ClientDriver建立到jdbc:derby:// localhost1527 / sample的连接(该连接被拒绝,因为找不到数据库示例)。”
Right click on Java DB
select Create Database
. 右键单击Java DB
选择“ Create Database
。
Database Name
'sample' 用作Database Name
“样本” User Name
'app' 用作用User Name
“ app” edit Seems there is a broken database or maybe one from an earlier Netbeans installation. 编辑似乎有一个损坏的数据库,或者可能是来自较早NetBeans安装的数据库。 Remove the sample
connection in Netbeans and remove the directory %USERPROFILE%\\.netbeans-derby\\sample
. 删除Netbeans中的sample
连接,并删除目录%USERPROFILE%\\.netbeans-derby\\sample
。 Recreate the sample
database as described above. 如上所述,重新创建sample
数据库。
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. 我只需要删除.netbeans-derby目录,然后重新安装Netbeans,就可以了。
The same thing happened to me and re-installing NetBeans did not help. 我也发生了同样的事情,重新安装NetBeans没有帮助。 After poking around the databases for a bit, I finally got mine working using the following process. 在数据库中闲逛了一会之后,我终于使用以下过程使我的工作得以完成。
A couple extra notes: 几个额外的注意事项:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.