Description of problem: 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. Version-Release number of selected component (if applicable): 1) Linux : Redhat 5.4 (2.6.18-194.el5 #1 SMP) 2) CUPS : cups-1.3.7-11.el5 3) JAVA : java version "1.4.2_24-rev" Java(TM) Platform, Standard Edition for Business (build 1.4.2_24-rev-b06) Java HotSpot(TM) Client VM (build 1.4.2_24-rev-b06, mixed mode) How reproducible: Always Steps to Reproduce: 1. There are two print servers using function below --> /etc/cups/cupsd.conf : Browsing 2. Compile the Java test case program provided with this bug report: $ javac Printer.java == Printer.java == import javax.print.*; import java.io.*; import java.net.URI; public class Printer { public static void main( String args[] ) { PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null); for (int i = 0; i < services.length; i++) { System.out.println(services[i].getName()); } } } 3. Run the java: $ java Printer.java Actual results: Expected results: returned empty list. Additional info: output by commmand lp [testserver:/sysopr/printer]lpstat -t scheduler is running system default destination: PRINTA device for PRINTB: socket://10.10.10.1:9100 device for PRINTB@HOSTA: ipp://HOSTA:631/printers/PRINTB device for PRINTA: socket://10.10.10.2:9100 device for PRINTA@HOSTA: ipp://HOSTA:631/printers/OSGROUP PRINTB accepting requests since Wed 16 Mar 2011 08:35:35 AM KST PRINTB@HOSTA accepting requests since Wed 16 Mar 2011 08:35:57 AM KST PRINTA accepting requests since Wed 16 Mar 2011 08:35:35 AM KST PRINTA@HOSTA accepting requests since Wed 16 Mar 2011 08:35:58 AM KST printer PRINTB is idle. enabled since Wed 16 Mar 2011 08:35:35 AM KST printer PRINTB@HOSTA is idle. enabled since Wed 16 Mar 2011 08:35:57 AM KST printer PRINTA is idle. enabled since Wed 16 Mar 2011 08:35:35 AM KST printer PRINTA@HOSTA is idle. enabled since Wed 16 Mar 2011 08:35:58 AM KST [testserver:/sysopr/printer] [testserver:/sysopr/printer]lpc status PRINTB: printer is on device 'socket' speed -1 queuing is enabled printing is enabled no entries daemon present PRINTB@HOSTA: printer is on device '/dev/null' speed -1 queuing is enabled printing is enabled no entries daemon present PRINTA: printer is on device 'socket' speed -1 queuing is enabled printing is enabled no entries daemon present PRINTA@HOSTA: printer is on device '/dev/null' speed -1 queuing is enabled printing is enabled no entries daemon present
*** This bug has been marked as a duplicate of bug 651381 ***