2014-03-30 33 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