1
我試圖連接到netbeans上的derby數據庫,但每次都會出現此錯誤。我已經做了一些研究,看到人們通過編輯策略文件解決了這個問題,但這並沒有幫助我。任何幫助,將不勝感激。Java數據庫連接無法連接到Derby數據庫Netbeans 7.4
Tue Feb 11 11:49:08 EST 2014 : Security manager installed using the Basic server security policy.
Tue Feb 11 11:49:09 EST 2014 : access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at java.security.AccessController.checkPermission(AccessController.java:559)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkListen(SecurityManager.java:1134)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)
at org.apache.derby.impl.drda.NetworkServerControlImpl.createServerSocket(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.access$000(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unknown Source)
at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unknown Source)
at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
好吧,這個錯誤不是來自嘗試連接到您的數據庫,它來自嘗試啓動網絡服務器。您是否按照https://db.apache.org/derby/docs/10.10/adminguide/tadminnetservbasic.html上的說明進行操作 –