United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6525150 Printer has "paper out" status and won't print due to a PrinterException
JDK-6525150 : Printer has "paper out" status and won't print due to a PrinterException

Details
Type:
Bug
Submit Date:
2007-02-14
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
client-libs
OS:
windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0,6
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:

Sub Tasks

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

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.
                                     
2007-02-20
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.
                                     
2007-02-27



Hardware and Software, Engineered to Work Together