Unable to start derby database from Netbeans 7.4

前端 未结 12 710
栀梦
栀梦 2020-12-04 12:21

I downloaded Netbeans 7.4 and Java 7 Update 51. I get the below error when I try to start Java DB or derby connection from Netbeans. This is on a windows 8 PC. I downloaded

12条回答
  •  一生所求
    2020-12-04 12:26

    This was doing my head in for a bit until I stumbled across the following in the NetBeans wiki

    JavaDB grant permissions

    JavaDB grant permissions

    How to grant permissions for Java DB / How to start Java DB

    Related to issue #239962

    JDK 7u51 comes with some security improvements which are causing problems with starting Java DB on this Java version.

    When you try to start DB from NetBeans you will probably get the Exception:

    java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")

    The same exception you will get while starting using script /db/bin/startNetworkServer

    Because there is no suitable way to fix it on the NetBeans side and this should be fixed on the side of the Java DB.

    There are several ways how to deal with this problem. I will mention only the easiest way. You have to start DB manually from command line.

    • Start Java DB with -noSecurityManager argument.

    (JDK 7u51 location)/db/bin/startNetworkServer -noSecurityManager

    Although it’s not exactly a solution it is usable as a quick workaround.

提交回复
热议问题