FULL PRODUCT VERSION : java version "1.5.0_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08) Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Redhat linux 9.0 Applicable to any linux distribution using LPRng or similar print system A DESCRIPTION OF THE PROBLEM : Printers with a dash ("-") in their name always shows status as "not accepting print jobs". It is not possible to print to such a printer. By replacing the /usr/sbin/lpc command with a script which pauses, I am able to determine that java is attempting to determine the printer status by executing the following command pipeline: /usr/sbin/lpc status bluej-printer| grep -E '^[ 0-9a-zA-Z]*@' | awk '{print $2, $3}' Contrast this to the command which is used to get the list of printers: /usr/sbin/lpc status | grep -E '^[ 0-9a-zA-Z_-]*@' | awk -F'@' '{print $1}' The significant difference is the lack of the dash (and underline) at the end of the grep regular expression in the former case. This causes retrieval of printer status to fail. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Setup a printer on an LPRng print system which has a dash in the printer name 2. Attempt to print to that printer using any java software EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - After 2, the printout should emerge from the printer. ACTUAL - When attempting 2, the printer status shows as "not accepting print jobs" and it is not possible to lodge the print job. ERROR MESSAGES/STACK TRACES THAT OCCUR : In the print dialog: "Status: Not accepting jobs". REPRODUCIBILITY : This bug can be reproduced always. CUSTOMER SUBMITTED WORKAROUND : Print to file, then print the file from the command line. - OR - Rename the troublesome printer. ###@###.### 2005-04-08 08:53:01 GMT
|