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.

Bug 957781

Summary: Exception in thread "main" java.lang.IllegalArgumentException: lowerBound may not be less than 1
Product: Red Hat Enterprise Linux 7 Reporter: Dagmar Prokopová <dprokopo>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: aph, mpolacek, ohudlick
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: 2013-08-28 11:47:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dagmar 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:

Comment 3 Dagmar Prokopová 2013-04-29 15:56:24 UTC
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?

Comment 4 Jakub Jelinek 2013-04-29 16:18:58 UTC
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.

Comment 5 Jakub Jelinek 2013-08-28 11:47:50 UTC
Not a bug in RHEL7 then.