This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Cannot connect to Derby DB after NB74 + JDK7u51 bundle | ||
---|---|---|---|
Product: | platform | Reporter: | Tomas Danek <musilt2> |
Component: | JDK Problems | Assignee: | Antonin Nebuzelsky <anebuzelsky> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | jhavlin, lfischmeistr, michbarsinai, mmirilovic, stezeb, White_King, wmontoza |
Priority: | P1 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Proposed Patch - Workaround for NetBeans 8 |
Description
Tomas Danek
2014-01-03 15:34:50 UTC
Please investigate, if this is regression in JDK or NB 7.4 bundle with latest JDK we need to fix it. I can confirm the regression between JDK 7u45 and 7u51. And also confirm that this bug is problem of JDK. In 7u45 starting of the Java DB works well but on 7u51 the AccessControlException appears. How to reproduce: Install JDK 7u51. Set JAVA_HOME to 7u51. Run <path to JDK>/db/bin/startNetworkServer (make sure that the db is really launched on 7u51) It behaves same on Windows, Mac and Linux. 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) Workaround described on wiki page: http://wiki.netbeans.org/JavaDB_grant_permissions Just a note - I can see the issue on my 64bit Win7 and Mac machines, but I don't see it on my Windows XP 32 bit machine. I can't view the status of the issue, so I don't know if this is already known. *** Bug 240504 has been marked as a duplicate of this bug. *** Created attachment 144818 [details]
Proposed Patch - Workaround for NetBeans 8
(In reply to Jaroslav Havlin from comment #8) > Created attachment 144818 [details] > Proposed Patch - Workaround for NetBeans 8 After discussion with Tomas, we chose a better solution. If the problem is detected in the standard output of the "start derby" process, a notification that offers disabling of the security manager in JavaDB is shown. (So no checking of JDK version is needed.) Many thanks to Tomas and Standa for help. http://hg.netbeans.org/core-main/rev/8af7a7d673bc Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8af7a7d673bc User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #239962: Offer disabling of security manager in JavaDB Integrated into 'main-silver', will be available in build *201402080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/99714a5112be User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #239962: Extend info message *** Bug 241792 has been marked as a duplicate of this bug. *** *** Bug 241941 has been marked as a duplicate of this bug. *** |