Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4908504

IllegalArgumentException thrown when printing on Solaris

XMLWordPrintable

    • 2d
    • b46
    • sparc
    • solaris_8, solaris_9
    • Verified

      I'm using latest nightly build on solaris:
      j2re-1_5_0-internal-bin-jdeploy_17_aug_2003_05_12-solaris-sparc-17_aug_2003.sh

      Step to reproduce:
      - Install J2RE. Enable console or trace in Java control panel, check you are
        using the 1.5 JRE.
      - Run notepad demo on java.sun.com. Type something then try to print.
        You will see the following exception:

      java.lang.IllegalArgumentException: services must contain defaultService
              at javax.print.ServiceUI.printDialog(ServiceUI.java:154)
              at sun.print.RasterPrinterJob$2.run(RasterPrinterJob.java:731)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:695)
              at sun.print.PSPrinterJob.printDialog(PSPrinterJob.java:486)
              at com.sun.jnlp.PrintServiceImpl$3.run(PrintServiceImpl.java:110)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.jnlp.PrintServiceImpl.doPrinting(PrintServiceImpl.java:96)
              at com.sun.jnlp.PrintServiceImpl.print(PrintServiceImpl.java:81)
              at Notepad$2.run(Notepad.java:769)

      - Now start control panel, select to use JRE 1.4.2 instead of 1.5.
      - Re-run above notepad demo, do a print job, the print job finished
        successfully.


      ###@###.### 2003-08-18
      ----

      JRE: any builds of 1.5

      The exception above always occurs in the following condition.

      - No printer definition in /etc/printers.conf
      - No LPDEST environment variable

      If the printer in LPDEST is defined in /etc/printers.conf, it works fine.
      However, if those either is not defined or LPDEST does have the printer
      which is not defined in /etc/printers.conf, it can be reproducible using 1.5.
      This problem does not occur using 1.4.2 so this is a regression for 1.5.

      ###@###.### 2004-03-25

            jgodinez Jennifer Godinez (Inactive)
            nwangsunw Nathan Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: