JDK-6491871 : Wrong printer status in Linux for non-"C" locale
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2006-11-09
  • 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.
JDK 7
7 b08Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Linux enterprise 2.6.17 #1 Tue Jul 4 00:01:31 CEST 2006 i686 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Cupsys Version: 1.1.23-10sarge1


A DESCRIPTION OF THE PROBLEM :
When opening a print dialog in java, the available printer is shown, but the dialog says "not accepting jobs", which is definately not the case.
So printing is not possible.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a new class.
Add following code to main method, compile and run.

		JTable table = new JTable();
		table.print();


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected result is a dialog that lets me print.
ACTUAL -
A dialog that does not allow printing because it "thinks" the printing is not accepting jobs (which is not the case).

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class Test {
  public static void main(String[] args) {
    JTable table = new JTable();
    table.print();
  }
}

---------- END SOURCE ----------
---------------
Jennifer Godinez wrote:

>> Thank you for reporting this incident.  Can you give me the output of
>>  "/usr/sbin/lpc status"?

Of course I can.

In German (my default locale):

[tobias@enterprise:]~$ /usr/sbin/lpc status
HP5550:
        Drucker verbunden ��ber 'hp' Geschwindigkeit -1
        Warteschlange ist freigegeben
        Drucken ist freigegeben
        Keine Eintr��ge
        Dienst l��uft

---------------------------

Comments
EVALUATION Printer is treated as non-CUPS so we parsed the output of "lpc status". This shows that JDK is not connecting to CUPS server.
13-11-2006

EVALUATION Fix is to exec commands in C locale.
09-11-2006