Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6707276

NPE while displaying PrintDialog from applet.

XMLWordPrintable

    • x86
    • windows

      NPE while displaying PrintDialog from applet.

      Some times print events are not getting dispatched due to this exception.

      steps to reproduce:
      Load Applet using Plugin2: http://sqindia.india.sun.com/disk17/deployment/raghu/JNLPSupport/JAWSServices/html/JNLPPrintService.html
      Click on "Set Page format" button or "Print using javax.jnlp.PrintService" button.



      Java Console output:
      Exception occurred during event dispatching:
      java.lang.NullPointerException: null pData
      at sun.awt.windows.WComponentPeer._requestFocus(Native Method)
      at sun.awt.windows.WComponentPeer.requestFocus(Unknown Source)
      at java.awt.Component.requestFocusHelper(Unknown Source)
      at java.awt.Component.requestFocusHelper(Unknown Source)
      at java.awt.Component.requestFocus(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.Dialog$1.run(Unknown Source)
      at java.awt.Dialog$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Dialog.show(Unknown Source)
      at java.awt.Component.show(Unknown Source)
      at java.awt.Component.setVisible(Unknown Source)
      at java.awt.Window.setVisible(Unknown Source)
      at java.awt.Dialog.setVisible(Unknown Source)
      at sun.awt.windows.WPrinterJob.pageDialog(Unknown Source)
      at com.sun.jnlp.PrintServiceImpl$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.jnlp.PrintServiceImpl.showPageFormatDialog(Unknown Source)
      at JNLPPrintService.setPageFormat(JNLPPrintService.java:55)
      at JNLPPrintService.actionPerformed(JNLPPrintService.java:90)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
      NEW page format is: java.awt.print.PageFormat@dc3b82
      DEFAULT page format is: java.awt.print.PageFormat@189a773
      NEW page format is: java.awt.print.PageFormat@651e95
      DEFAULT page format is: java.awt.print.PageFormat@490342
      NEW page format is: java.awt.print.PageFormat@e85825
      Exception occurred during event dispatching:
      java.lang.NullPointerException: null pData
      at sun.awt.windows.WComponentPeer._requestFocus(Native Method)
      at sun.awt.windows.WComponentPeer.requestFocus(Unknown Source)
      at java.awt.Component.requestFocusHelper(Unknown Source)
      at java.awt.Component.requestFocusHelper(Unknown Source)
      at java.awt.Component.requestFocus(Unknown Source)
      at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.Dialog$1.run(Unknown Source)
      at java.awt.Dialog$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Dialog.show(Unknown Source)
      at java.awt.Component.show(Unknown Source)
      at java.awt.Component.setVisible(Unknown Source)
      at java.awt.Window.setVisible(Unknown Source)
      at java.awt.Dialog.setVisible(Unknown Source)
      at sun.awt.windows.WPrinterJob.displayNativeDialog(Unknown Source)
      at sun.awt.windows.WPrinterJob.printDialog(Unknown Source)
      at com.sun.jnlp.PrintServiceImpl$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.jnlp.PrintServiceImpl.doPrinting(Unknown Source)
      at com.sun.jnlp.PrintServiceImpl.print(Unknown Source)
      at JNLPPrintService.print(JNLPPrintService.java:74)
      at JNLPPrintService.actionPerformed(JNLPPrintService.java:88)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
      DEFAULT page format is: java.awt.print.PageFormat@1e29b99

            ccheung Calvin Cheung
            rnairsunw Raghu Nair
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: