Bug 651381

Summary: PrintServiceLookup.lookupPrintServices() fails
Product: Red Hat Enterprise Linux 5 Reporter: Tim Waugh <twaugh>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: aph, yoon.seokbae
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-15 12:11:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 595852    

Description Tim Waugh 2010-11-09 13:05:39 UTC
Description of problem:
While investigating bug #595852 I discovered that the PrintServiceLookup.lookupPrintServices() implementation is not working correctly.  

Version-Release number of selected component (if applicable):
gcc-4.1.2-48.el5
cups-1.3.7-18.el5.5

How reproducible:
100%

Steps to Reproduce:
1. lpadmin -p foo -m pxlmono.ppd -v 'serial:/dev/ttyS0?baud=115200' -E
2. lpadmin -d foo
3. gcj -o test --main=test test.java
4. ./test
5. lpstat -s

Actual results:
4.
No printers available

5.
system default destination: foo
device for foo: serial:/dev/ttyS0?baud=115200

Expected results:
"foo" listed at step 4.

Additional info:
There is a suspicious comment in bug #618258 comment #3 as well:
==>
There is one differences: no printer I have supports
DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST, I I had to use
DocFlavor.INPUT_STREAM.POSTSCRIPT.  I doubt that this makes much of a
difference.
<==

All CUPS printers that support application/postscript also support text/plain.  This is because CUPS provides a filter that converts text/plain into application/postscript.

This makes me think that the PrintServiceLookup implementation is not correctly matching printer MIME types to DocFlavor types.

Comment 2 RHEL Program Management 2010-12-07 09:45:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.6 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 5 Tim Waugh 2011-03-18 13:41:36 UTC
*** Bug 688480 has been marked as a duplicate of this bug. ***

Comment 6 Tim Waugh 2011-03-18 13:42:19 UTC
More information about this problem is in bug #688480:

"When using Java's javax.print.PrintServiceLookup.lookupPrintServices
method, it returns an empty list of print services if the "Browsing"
directive in CUPS is turned on. If the "Browsing" directive in CUPS is
turned off, it works correctly returning a list of printers."

Comment 7 Tim Waugh 2011-04-15 12:11:49 UTC

*** This bug has been marked as a duplicate of bug 578382 ***