Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionDagmar Prokopová
2013-04-29 14:06:32 UTC
Description of problem:
I have the following test program:
import javax.print.attribute.standard.PrinterIsAcceptingJobs;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
class listprinters {
public static void main(String[] argv) {
PrintService ss[] = PrintServiceLookup.lookupPrintServices(null,null);
System.out.println("found " + ss.length + " services");
for(int i = 0; i < ss.length; i++) {
javax.print.attribute.Attribute att[] = ss[i].getAttributes().toArray();
System.out.println("found " + att.length + " attributes for " + ss[i].getName());
for(int j = 0; j < att.length; j++)
System.out.println(ss[i].getName() + "/" + att[j].getName() +
(att[j].equals(PrinterIsAcceptingJobs.ACCEPTING_JOBS) ?
"" : "not") + " accepting jobs"
);
}
}
}
When I build a binary and run it, I get the following error:
Exception in thread "main" java.lang.IllegalArgumentException: lowerBound may not be less than 1
at javax.print.attribute.standard.JobKOctetsSupported.<init>(libgcj.so.13)
at gnu.javax.print.ipp.IppResponse$ResponseReader.parseAttributes(libgcj.so.13)
at gnu.javax.print.ipp.IppResponse$ResponseReader.parseResponse(libgcj.so.13)
at gnu.javax.print.ipp.IppResponse.setResponseData(libgcj.so.13)
at gnu.javax.print.ipp.IppRequest.send(libgcj.so.13)
at gnu.javax.print.ipp.IppPrintService.getPrinterAttributes(libgcj.so.13)
at gnu.javax.print.ipp.IppPrintService.<init>(libgcj.so.13)
at gnu.javax.print.ipp.IppMultiDocPrintService.<init>(libgcj.so.13)
at gnu.javax.print.CupsPrintService.<init>(libgcj.so.13)
at gnu.javax.print.CupsServer.getAllPrinters(libgcj.so.13)
at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13)
at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13)
at javax.print.PrintServiceLookup.lookupPrintServices(libgcj.so.13)
at listprintersOne.main(listprintersOne)
This happens only on rhel7, it did not occure on rhel6 neither rhel5. Is this intended or is it a bug?
Version-Release number of selected component (if applicable):
gcc-java-4.7.2-8.el7.x86_64
cups-1.5.4-22.el7.x86_64
cups-libs-1.5.4-22.el7.x86_64
libgcj-devel-4.7.2-8.el7.x86_64
libgcj-4.7.2-8.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. service cups start
2. create a listprinters.java file with the simple test code
3. build a binary gcj -o listprinters --main=listprinters ./listprinters.java
4. run the binary
Actual results:
should not throw an exception
Expected results:
an exception is thrown
Additional info:
I could not find gcc-java-4.8 (at least not in brew). Can you give me a hint what package do I need instead to build java file. Or am I just looking for it at a wrong place?
Ah right, forgot that, %if 0%{?rhel} >= 7 then we don't build gcj at all.
Thus nothing to test for RHEL7 then...
Though if it doesn't work with gcc 4.8.0, perhaps something to investigate for F19+ which still enables gcj.
Description of problem: I have the following test program: import javax.print.attribute.standard.PrinterIsAcceptingJobs; import javax.print.PrintService; import javax.print.PrintServiceLookup; class listprinters { public static void main(String[] argv) { PrintService ss[] = PrintServiceLookup.lookupPrintServices(null,null); System.out.println("found " + ss.length + " services"); for(int i = 0; i < ss.length; i++) { javax.print.attribute.Attribute att[] = ss[i].getAttributes().toArray(); System.out.println("found " + att.length + " attributes for " + ss[i].getName()); for(int j = 0; j < att.length; j++) System.out.println(ss[i].getName() + "/" + att[j].getName() + (att[j].equals(PrinterIsAcceptingJobs.ACCEPTING_JOBS) ? "" : "not") + " accepting jobs" ); } } } When I build a binary and run it, I get the following error: Exception in thread "main" java.lang.IllegalArgumentException: lowerBound may not be less than 1 at javax.print.attribute.standard.JobKOctetsSupported.<init>(libgcj.so.13) at gnu.javax.print.ipp.IppResponse$ResponseReader.parseAttributes(libgcj.so.13) at gnu.javax.print.ipp.IppResponse$ResponseReader.parseResponse(libgcj.so.13) at gnu.javax.print.ipp.IppResponse.setResponseData(libgcj.so.13) at gnu.javax.print.ipp.IppRequest.send(libgcj.so.13) at gnu.javax.print.ipp.IppPrintService.getPrinterAttributes(libgcj.so.13) at gnu.javax.print.ipp.IppPrintService.<init>(libgcj.so.13) at gnu.javax.print.ipp.IppMultiDocPrintService.<init>(libgcj.so.13) at gnu.javax.print.CupsPrintService.<init>(libgcj.so.13) at gnu.javax.print.CupsServer.getAllPrinters(libgcj.so.13) at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13) at gnu.javax.print.CupsPrintServiceLookup.getPrintServices(libgcj.so.13) at javax.print.PrintServiceLookup.lookupPrintServices(libgcj.so.13) at listprintersOne.main(listprintersOne) This happens only on rhel7, it did not occure on rhel6 neither rhel5. Is this intended or is it a bug? Version-Release number of selected component (if applicable): gcc-java-4.7.2-8.el7.x86_64 cups-1.5.4-22.el7.x86_64 cups-libs-1.5.4-22.el7.x86_64 libgcj-devel-4.7.2-8.el7.x86_64 libgcj-4.7.2-8.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. service cups start 2. create a listprinters.java file with the simple test code 3. build a binary gcj -o listprinters --main=listprinters ./listprinters.java 4. run the binary Actual results: should not throw an exception Expected results: an exception is thrown Additional info: