java - 在 jre 8/netbeans 7.4 中运行 javadb 时出错

标签 java netbeans derby javadb

我最近更新到了 jre8。看来现在的安全设置确实很糟糕。我无法运行 javadb

我收到以下错误

Mon Mar 31 02: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”“localhost:1527”“listen,resolve”)

我采取了哪些步骤

  • 更改了 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文件)我该如何编辑,我该编辑什么

谢谢

最佳答案

认为你需要表现

1) 如何启动服务器(cmdline) 2)你得到的堆栈跟踪 3) 您的策略文件的内容

或者,您可以研究 corresponding Derby Jira issue 中的评论

关于java - 在 jre 8/netbeans 7.4 中运行 javadb 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22749780/

相关文章:

java - 在 Derby 中将主键列类型从 Integer 迁移到 BigInt

java - 在 NetBeans 中,如何将 "Java Application"项目转换为 "Web Application"项目?

derby - RazorSQL,使用Derby添加配置文件

java - 无法在 Dropbox 文件夹内创建 Java NetBeans 项目

java - Facebook 分享图片 sharedialog

java - 如何计算球的下一个方向

java - Android 应用程序崩溃 - 我创建对象的位置就是原因

c++ - netbeans 找不到包含文件 <iostream.h>

netbeans - 适用于 Linux 的诺基亚 s60 模拟器

java - Java 8 下的 Derby 10.15.1.3 为 "No suitable driver found..."