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.

Bug 227169

Summary: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
Product: debugger Reporter: Alexandr Scherbatiy <sunflower>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 199392
Attachments: stacktrace

Description Alexandr Scherbatiy 2013-03-07 13:42:34 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) Client VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 7

Stacktrace: 
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
   at java.security.AccessControlContext.checkPermission(AccessControlContext.java:364)
   at java.security.AccessController.checkPermission(AccessController.java:560)
   at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
   at sun.applet.AppletSecurity.checkAccess(AppletSecurity.java:252)
   at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
   at java.lang.Thread.init(Thread.java:376)
Comment 1 Alexandr Scherbatiy 2013-03-07 13:42:35 UTC
Created attachment 132339 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2013-03-07 13:58:02 UTC
The exception is propagated from a user application during the application debugging.
Comment 3 Martin Entlicher 2013-03-12 16:02:11 UTC
Reproduced. It's an applet security problem.
I've reproduced it in following steps:
1) Create an JApplet in a Java project.
2) Open applet.policy file and comment-out the second line (add a hash #)
3) Debug the applet.
4) The exception is thrown.
Comment 4 Martin Entlicher 2013-03-13 14:54:26 UTC
Fixed by changeset:   248384:bf391d6a6c3c
http://hg.netbeans.org/core-main/rev/bf391d6a6c3c
Comment 5 Quality Engineering 2013-03-14 02:09:27 UTC
Integrated into 'main-golden', will be available in build *201303132300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bf391d6a6c3c
User: mentlicher@netbeans.org
Log: #227169: Be careful when creating service thread and catch potential SecurityException.