2014-03-30 29 views
0

我最近更新到jre8。看來目前的安全設置真的很糟糕。我無法運行JavaDB之外錯誤在jre 8中運行javadb/netbeans 7.4

我收到以下錯誤

週一3月31日2時04分54秒IST 2014:使用基本服務器安全策略設置安全管理器。 Mon Mar 31 02:04:54 IST 2014:訪問被拒絕(「java.net.SocketPermission」「localhost:1527」「listen,resolve」) java.security.AccessControlException:訪問被拒絕(「java.net.SocketPermission」 「本地主機:1527」「聽着,解決」)

什麼

  • 在java.policy文件改變了許可,我所採取的步驟,聽取1527(還加解析) - 但無濟於事

這是什麼http://www.oracle.com/technetwork/java/javase/8-known-issues-2157115.html給出

Bug 8030961

Area: Java DB Synopsis An additional permission may be needed to bring up the Java DB network server. In particular, the startup scripts in may fail to boot the network server.

While attempting to boot, the network server may fail and raise the following error:

access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve") java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve") To fix this problem, you must bring up the network server with a security policy that includes the missing permission. Instead of booting the network server as:

java org.apache.derby.drda.NetworkServerControl start boot the network server as follows:

java -Djava.security.manager -Djava.security.policy=${yourPolicyFile} org.apache.derby.drda.NetworkServerControl start where ${yourPolicyFile} is a file containing a customized version of the policy file described in the Java DB Admin Guide section titled Basic Network Server security policy. You must customize that generic policy file to fit your application. In addition, you must add the following permission to the permissions block granted to the ${derby.install.url}derbynet.jar codebase:

permission java.net.SocketPermission "localhost:${port}", "listen"; where ${port} should be replaced by the port number where the network server listens for incoming connection requests. By default, that is port 1527.

現在我正好不知道該怎麼辦 *做我需要做任何額外的東西 *發現derbynet.jar(作爲一個可執行的JAR文件)我怎麼修改,我該怎麼編輯

謝謝,

+0

的評論你的問題是混亂:你改變你的java策略設置或不?你有沒有嘗試過:http://stuetzpunkt.wordpress.com/2014/01/20/javadb-derbydb-access-denied-java-net-socketpermission-localhost1527-listenresolve/ –

+0

@ BryanPendleton,對於遲到的迴應感到抱歉,但接下來的文章中提到的指令,都能跟得上沒有工作,仍然可以訪問被拒絕...... –

+0

@StevenMai ,,不重複的,因爲你有政策的變化來緩解這個問題在JDK 1.7,而這裏是1.8,這樣的措施不是簡單的工作! –

回答

1

認爲你需要顯示

1)如何使你啓動服務器(CMDLINE) 2)堆棧跟蹤你 3)你的政策文件的內容

或者你可以研究在corresponding Derby Jira issue