This discussion is archived
8 Replies Latest reply: Mar 11, 2013 10:29 PM by 992766 RSS

OutOfMemoryError while printing help

992766 Newbie
Currently Being Moderated
Hello.

I need to implement functionality to be able to pring help (*.hs). I do follow java examples and everthing seems working, but when getting to the actual print operation, the following events happen:

1. the printer queue is constantly in spooling.
2. javaw.exe process constantly increases the memory usage
3. if to leave javaw.exe running for some time, the followng exception is thrown:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at java.lang.String.<init>(String.java:374)
at com.sun.java.help.impl.JHelpPrintHandler1_2$JH12Printable.createTransforms(JHelpPrintHandler1_2.java:425)
at com.sun.java.help.impl.JHelpPrintHandler1_2$JH12Printable.print(JHelpPrintHandler1_2.java:468)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1980)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1469)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1285)
at com.sun.java.help.impl.JHelpPrintHandler1_2$Print1dot2.propertyChange(JHelpPrintHandler1_2.java:201)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:346)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:274)
at java.awt.Component.firePropertyChange(Component.java:8393)
at javax.swing.JEditorPane.access$200(JEditorPane.java:203)
at javax.swing.JEditorPane$PageLoader$3.run(JEditorPane.java:688)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:262)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:716)
at java.awt.EventQueue.access$000(EventQueue.java:112)
at java.awt.EventQueue$3.run(EventQueue.java:677)
at java.awt.EventQueue$3.run(EventQueue.java:675)
at java.security.AccessController.doPrivileged(AccessController.java:252)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:686)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:222)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:101)

Heap size was relatively big, 1024K.

Any ideas what is going wrong?
Thanks in advance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points