JDK-6525150 : Printer has "paper out" status and won't print due to a PrinterException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-02-14
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7
5.0u17Fixed 6u2Fixed 7 b14Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
We are getting a status of "Paper out" on various HP 8000N and HP 8000DN printers. When we get the message they are not actually out of paper. But a print request will fail with this stack trace:

java.awt.print.PrinterException: Printer is not accepting job.
   at sun.print.RasterPrinterJob.print
   at sun.print.RasterPrinterJob.print
   at <our code that submitted the print job>

Several different users have gotten this problem, with different printers at the same time. In fact at one point I couldn't print to a printer,but a team mate could print to that printer and both of us were using the the same code. At the same time, this same team mate could not print to a different printer that I was able to print to. We each had about 4 printers available, but only one would get this problem.

The printer that could not print via Java 1.6 was not the Default Printer for either of us. And we tested that making a printer the default or not had no effect on the problem.

What we did discover was that if we Deleted the printer that we could not print to and then recreated it using the Windows "Printers and Faxes" interface, then the problem would go away.

Whenever a printer was having this problem under 1.6 we found that it would work fine from a native Windows App (like Word) or that it would work fine if we ran our applet under 1.4.2 rather than 1.6.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see above

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
should be able to print
ACTUAL -
printer often unable to print

ERROR MESSAGES/STACK TRACES THAT OCCUR :
ava.awt.print.PrinterException: Printer is not accepting job.
   at sun.print.RasterPrinterJob.print
   at sun.print.RasterPrinterJob.print
   at <our code that submitted the print job>


REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
not applicable
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
As stated above, using Windows to delete and recreate the printer seems to clear the error.
But thought Sun would like to know about the problem.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION From the customer: Paper out: " From the Windows Printer selection dialog that appears as a result of calling PrinterJob.printDialog()." Since this is a native print dialog, most likely the paper out status is coming from the Windows' GDI/Print spooler. The exception is thrown after we detected this status but maybe we should be less strict about some printer conditions before throwing any exceptions.
27-02-2007

EVALUATION E-mailed customer asking for additional info: 1. How did you get the Paper Out status? 2. Test case to reproduce the problem Marking incomplete.
20-02-2007