Bug 651381 - PrintServiceLookup.lookupPrintServices() fails
Summary: PrintServiceLookup.lookupPrintServices() fails
Keywords:
Status: CLOSED DUPLICATE of bug 578382
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.5
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
: 688480 (view as bug list)
Depends On:
Blocks: 595852
TreeView+ depends on / blocked
 
Reported: 2010-11-09 13:05 UTC by Tim Waugh
Modified: 2011-05-13 12:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-15 12:11:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.