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.
I have an RMI swing application that has been running a decade. I modified for platform and 7.1 has been running it nicely. 7.2 beta, 7.2RC and 7.2 daily builds all crash. Pertinent code follows: // locate the registry on the server and obtain the SessionConnect object... try { java.rmi.registry.Registry registry = LocateRegistry.getRegistry(object.getURL(), 1097); sc = (SessionConnect) registry.lookup("SessionConnect"); } The crash happens at the line sc = ..... which is line 280 of class ConnectionTopComponent. The message is as follows: java.lang.Exception: Dangerous reflection access to sun.misc.GC$Daemon by class java.lang.Thread$1 detected! [catch] at org.netbeans.TopSecurityManager.checkMemberAccess(TopSecurityManager.java:435) at java.lang.Class.checkMemberAccess(Class.java:2174) at java.lang.Class.getDeclaredMethod(Class.java:1951) at java.lang.Thread$1.run(Thread.java:1682) at java.lang.Thread$1.run(Thread.java:1675) at java.security.AccessController.doPrivileged(Native Method) at java.lang.Thread.auditSubclass(Thread.java:1674) at java.lang.Thread.isCCLOverridden(Thread.java:1661) at java.lang.Thread.init(Thread.java:382) at java.lang.Thread.<init>(Thread.java:509) at sun.misc.GC$Daemon.<init>(GC.java:126) at sun.misc.GC$Daemon.<init>(GC.java:86) at sun.misc.GC$Daemon$1.run(GC.java:137) at sun.misc.GC$Daemon$1.run(GC.java:131) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.GC$Daemon.create(GC.java:144) at sun.misc.GC.setLatencyTarget(GC.java:157) at sun.misc.GC.access$500(GC.java:41) at sun.misc.GC$LatencyRequest.adjustLatencyIfNeeded(GC.java:193) at sun.misc.GC$LatencyRequest.<init>(GC.java:218) at sun.misc.GC$LatencyRequest.<init>(GC.java:173) at sun.misc.GC.requestLatency(GC.java:271) at sun.rmi.transport.DGCClient$EndpointEntry.lookup(DGCClient.java:230) at sun.rmi.transport.DGCClient.registerRefs(DGCClient.java:138) at sun.rmi.transport.ConnectionInputStream.registerRefs(ConnectionInputStream.java:98) at sun.rmi.transport.StreamRemoteCall.releaseInputStream(StreamRemoteCall.java:156) at sun.rmi.transport.StreamRemoteCall.done(StreamRemoteCall.java:310) at sun.rmi.server.UnicastRef.done(UnicastRef.java:449) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.yrs.client.topcomponents.ConnectionTopComponent.btnConnectActionPerformed(ConnectionTopComponent.java:280) As I mentioned, this code has been working for a decade and has been working on the 7.1 platform without issues. It's broken, however, for all versions of 7.2.
Appears to be fixed in daily 20120719.
I spoke too early. The exception is still being thrown. But the rest of my code is working now in spite of the exception.
Caused by fix of issue 214019. Jardo, please help the reporter resolve this problem.
(In reply to comment #2) > I spoke too early. The exception is still being thrown. But the rest of my > code is working now in spite of the exception. This is not a "real exception", it is created only to be a part of warning which tells you that "sun.misc" class is accessed by reflection. The warning (in fact logger message of level INFO) is shown only once par class, and only if assertions are enabled (usually development builds). If assertions are disabled, the message has level FINE. In this case the sun.misc.GC$Daemon is called from java.lang.Thread$1, not from user code, so it can be ignored. Fixed in http://hg.netbeans.org/core-main/rev/578350dca79a Thanks for reporting.
Integrated into 'main-golden', will be available in build *201207241500* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/578350dca79a User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #215383: Add caller "java.lang.Thread$1" to "sun.misc" access whitelist
http://hg.netbeans.org/releases/rev/2cc2d1cd8c9a Integrated into release72 branch. See bug 215895.
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/2cc2d1cd8c9a User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #215383: Add caller "java.lang.Thread$1" to "sun.misc" access whitelist
changeset looks fine, mechanism itself was verified as part of bug 215895 -> verified.