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 45500 - SecurityException thrown at every start from the Swing clipboard hack
Summary: SecurityException thrown at every start from the Swing clipboard hack
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 45355 45873 46185 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-23 23:02 UTC by _ ttran
Modified: 2008-12-22 21:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This fix gets rid of the exception on 1.5 and makes the clipboard related tests work again (3.37 KB, patch)
2004-07-20 16:31 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ ttran 2004-06-23 23:02:40 UTC
[jdk 1.5.0-beta3-b56, linux, IDE built from CVS
2004-06-24]

I got this at every startup with jdk 1.5.0b56, but
not with jdk 1.4.2_04 


java.lang.SecurityException
	at
org.netbeans.TopSecurityManager.checkSystemClipboardAccess(TopSecurityManager.java:419)
	at
sun.awt.X11.XToolkit.getSystemClipboard(XToolkit.java:762)
	at
javax.swing.TransferHandler$TransferAction.getClipboard(TransferHandler.java:856)
	at
javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:822)
	at
org.netbeans.TopSecurityManager.makeSwingUseSpecialClipboard(TopSecurityManager.java:433)
	at org.netbeans.core.NonGui.run(NonGui.java:433)
	at org.netbeans.core.Main.run(Main.java:168)
	at
org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:232)
	at
org.netbeans.core.NbTopManager.get(NbTopManager.java:187)
	at org.netbeans.core.Main.start(Main.java:310)
	at
org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:595)
Comment 1 Jaroslav Tulach 2004-06-25 12:48:40 UTC
Demonstrated by failing tests: org.netbeans.core.NbClipboardIsUsed*

Comment 2 Jaroslav Tulach 2004-06-25 15:16:15 UTC
After 20min looking at the issue I think that the jdk changed its
behaviour to always ask the for the system clipboard. In past it was
enough to just ask once (and fail) and the access to system clipboard
was disabled for ever. Then we just replaced the clipboard in AppContext. 

But this does not work anymore. The simplest solution might be to ask
the JDK team to return back the one and only check. Btw. worked with
1.5 b51.
Comment 3 Jiri Skrivanek 2004-07-01 13:38:00 UTC
*** Issue 45355 has been marked as a duplicate of this issue. ***
Comment 4 Jaroslav Tulach 2004-07-20 11:48:10 UTC
*** Issue 46185 has been marked as a duplicate of this issue. ***
Comment 5 Jaroslav Tulach 2004-07-20 11:49:15 UTC
Introduced in build 56 of jdk 1.5, and is included in public beta 3.
Comment 6 Jaroslav Tulach 2004-07-20 16:31:45 UTC
Created attachment 16343 [details]
This fix gets rid of the exception on 1.5 and makes the clipboard related tests work again
Comment 7 Jaroslav Tulach 2004-07-22 16:23:00 UTC
I'll apply the patch tomorrow.
Comment 8 Jaroslav Tulach 2004-07-23 10:36:03 UTC
Forcing usage of our ExClipboard in swing components also on JDK 1.5.
This is related to JDK bug 5076514:

core/bootstrap/src/org/netbeans/TopSecurityManager.java,v  <-- 
TopSecurityManager.java
new revision: 1.15;

Comment 9 Jaroslav Tulach 2004-07-29 08:46:13 UTC
*** Issue 45873 has been marked as a duplicate of this issue. ***
Comment 10 Marian Mirilovic 2004-08-11 10:22:10 UTC
verified in [nb_dev](200408101800)