java.lang.IllegalStateException: cannot open system clipboard

Oracle Community | 529448 | 9 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Failed session with Java Thread error message

    Oracle Community | 9 years ago | 529448
    java.lang.IllegalStateException: cannot open system clipboard
  2. 0

    How to listen to the clipboard?

    Coderanch | 1 decade ago | marc weber
    java.lang.IllegalStateException: cannot open system clipboard
  3. 0

    IllegalStateException getting data from clipboard

    Stack Overflow | 3 months ago | Coded Apple
    java.lang.IllegalStateException: cannot open system clipboard
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hi All, From time to time, switching back to a Spring RC window (ALT+TAB) from another Windows application seems to trigger this exception: java.lang.IllegalStateException: cannot open system clipboard I have not been able to reproduce this issue reliably, it happens from time to time. The stacktrace seems to be entirely in SpringRC/Swing. The issue faced is that the exception is thrown all the way to the user and there is no known things that I could do to remediate it. Furthermore, this does not seem to affect the application at all... so my suggestion would be to catch this exception in TextComponentPopup and simply log a warning? I know it would be better to find the root cause but that seems to be between Windows and the JRE... Has anyone seen this? java.lang.IllegalStateException: cannot open system clipboard java.lang.IllegalStateException: cannot open system clipboard at sun.awt.windows.WClipboard.openClipboard(Native Method) at sun.awt.datatransfer.ClipboardTransferable.(ClipboardTransferable.java:61) at sun.awt.datatransfer.SunClipboard.getContents(SunClipboard.java:130) at org.springframework.richclient.text.TextComponentPopup.canPasteFromClipboard (TextComponentPopup.java:261) at org.springframework.richclient.text.TextComponentPopup.updatePasteStatus(TextComponentPopup.java:253) at org.springframework.richclient.text.TextComponentPopup.access$2 (TextComponentPopup.java:252) at org.springframework.richclient.text.TextComponentPopup$1.actionPerformed(TextComponentPopup.java:106) at javax.swing.Timer.fireActionPerformed(Timer.java :271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java :461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run (EventDispatchThread.java:110)

    Spring JIRA | 9 years ago | Benoit Xhenseval
    java.lang.IllegalStateException: cannot open system clipboard
  6. 0

    Hi All, From time to time, switching back to a Spring RC window (ALT+TAB) from another Windows application seems to trigger this exception: java.lang.IllegalStateException: cannot open system clipboard I have not been able to reproduce this issue reliably, it happens from time to time. The stacktrace seems to be entirely in SpringRC/Swing. The issue faced is that the exception is thrown all the way to the user and there is no known things that I could do to remediate it. Furthermore, this does not seem to affect the application at all... so my suggestion would be to catch this exception in TextComponentPopup and simply log a warning? I know it would be better to find the root cause but that seems to be between Windows and the JRE... Has anyone seen this? java.lang.IllegalStateException: cannot open system clipboard java.lang.IllegalStateException: cannot open system clipboard at sun.awt.windows.WClipboard.openClipboard(Native Method) at sun.awt.datatransfer.ClipboardTransferable.(ClipboardTransferable.java:61) at sun.awt.datatransfer.SunClipboard.getContents(SunClipboard.java:130) at org.springframework.richclient.text.TextComponentPopup.canPasteFromClipboard (TextComponentPopup.java:261) at org.springframework.richclient.text.TextComponentPopup.updatePasteStatus(TextComponentPopup.java:253) at org.springframework.richclient.text.TextComponentPopup.access$2 (TextComponentPopup.java:252) at org.springframework.richclient.text.TextComponentPopup$1.actionPerformed(TextComponentPopup.java:106) at javax.swing.Timer.fireActionPerformed(Timer.java :271) at javax.swing.Timer$DoPostEvent.run(Timer.java:201) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java :461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run (EventDispatchThread.java:110)

    Spring JIRA | 9 years ago | Benoit Xhenseval
    java.lang.IllegalStateException: cannot open system clipboard

    Root Cause Analysis

    1. java.lang.IllegalStateException

      cannot open system clipboard

      at sun.awt.windows.WClipboard.openClipboard()
    2. Java RT
      SunClipboard.getContents
      1. sun.awt.windows.WClipboard.openClipboard(Native Method)
      2. sun.awt.datatransfer.ClipboardTransferable.<init>(Unknown Source)
      3. sun.awt.datatransfer.SunClipboard.getContents(Unknown Source)
      3 frames
    3. oracle.ewt.lwAWT
      LWTextField.processKeyEvent
      1. oracle.ewt.lwAWT.lwText.LWTextComponent._pasteImpl(Unknown Source)
      2. oracle.ewt.lwAWT.lwText.LWTextComponent.paste(Unknown Source)
      3. oracle.ewt.lwAWT.lwText.LWTextComponent.processKeyEvent(Unknown Source)
      4. oracle.ewt.lwAWT.lwText.LWCommonText.processKeyEvent(Unknown Source)
      5. oracle.ewt.lwAWT.lwText.LWTextField.processKeyEvent(Unknown Source)
      5 frames
    4. Java RT
      Container.processEvent
      1. java.awt.Component.processEvent(Unknown Source)
      2. java.awt.Container.processEvent(Unknown Source)
      2 frames
    5. oracle.ewt.lwAWT
      LWComponent.processEvent
      1. oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
      2. oracle.ewt.lwAWT.lwText.LWTextComponent.processEventImpl(Unknown Source)
      3. oracle.ewt.lwAWT.lwText.LWTextField.processEventImpl(Unknown Source)
      4. oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
      5. oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
      5 frames
    6. Java RT
      EventDispatchThread.run
      1. java.awt.Component.dispatchEventImpl(Unknown Source)
      2. java.awt.Container.dispatchEventImpl(Unknown Source)
      3. java.awt.Component.dispatchEvent(Unknown Source)
      4. java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
      5. java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
      6. java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
      7. java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
      8. java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
      9. java.awt.Component.dispatchEventImpl(Unknown Source)
      10. java.awt.Container.dispatchEventImpl(Unknown Source)
      11. java.awt.Window.dispatchEventImpl(Unknown Source)
      12. java.awt.Component.dispatchEvent(Unknown Source)
      13. java.awt.EventQueue.dispatchEvent(Unknown Source)
      14. java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      15. java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      16. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      17. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      18. java.awt.EventDispatchThread.run(Unknown Source)
      18 frames