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

NullPointerException in IPPPrintService.findCustomMedia()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • client-libs
    • 2d
    • x86
    • linux

      FULL PRODUCT VERSION :
      java version "1.6.0_04"
      Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
      Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
      java version "1.5.0_14"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
      Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Suse Linux Enterprice Server 10
      output of uname -a:
      Linux 2.6.16.21-0.8-bigsmp #1 SMP Mon Jul 3 18:25:39 UTC 2006
      i686 i686 i386 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      CUPS version 1.1.23

      A DESCRIPTION OF THE PROBLEM :
      We are running a java printing application which executes print jobs for
      about hundred different clients on about hundred different printers which
      are configured in CUPS. During the test phase everything went fine, but
      since we started to use the system in production we repeatedly got the
      following NullPointerException in
      sun.print.IPPPrintService.findCustomMedia().

          java.lang.NullPointerException
                  at
      sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:800)
                  at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
                  ...

      Since Bug ID 6390756 states the same exception, and since this Bug is
      claimed to be a duplicate of 4997933 which is fixed in Java 6.0 I tried to
      run the system with Java 1.6.0_04. There I got a similar Exception, which
      just had different linennumbers, namely:

          java.lang.NullPointerException
                  at
      sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:845)
                  at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)

      It seems that this NullPointerException is only thrown, when our printing
      system is on heavy duty (with respect to the number of printouts, not CPU
      usage). Since we use our application in production, it started about 2000
      to 7000 print jobs per day. About 500 to 2000 of them where terminated
      with this NullPointerException.

      While reproducing the problem is very hard, I come up with a solution
      already. I downloaded the 1.5.0 JDK source and changed the classes
      sun.print.IPPPrintService and sun.print.CUPSPrinter as follows. Please
      verify the changes and incorporate them in the next versions of 1.5.0 and
      1.6.0.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile the above given sources and put them in the boot class path (with
      java option -Xbootclasspath/p:).

      SOURCE
      Attached seperatly

      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

      CUSTOMER SUBMITTED WORKAROUND :
      Compile the above given sources and put them in the boot class path (with
      java option -Xbootclasspath/p:).

            jgodinez Jennifer Godinez (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: