Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 2010 12:53:13 GMT
From:      "Dr. Andreas Haakh" <bugReporter@ib-haakh.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   java/147129: Printing to cups-network-printer fails with null-pointer-exception
Message-ID:  <201005271253.o4RCrDa2057251@www.freebsd.org>
Resent-Message-ID: <201005271300.o4RD0FR9043987@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         147129
>Category:       java
>Synopsis:       Printing to cups-network-printer fails with null-pointer-exception
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-java
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 27 13:00:15 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Dr. Andreas Haakh
>Release:        8.0-STABLE
>Organization:
Ingenieurbüro Haakh
>Environment:
FreeBSD Crabberio.Haakh.de 8.0-STABLE FreeBSD 8.0-STABLE #46: Thu Apr 22 12:44:27 CEST 2010     root@Crabberio.Haakh.de:/usr/obj/usr/src/sys/CRABBERIO  amd64

>Description:
Trying to print to causes:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: null attribute
        at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1147)
        at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2121)
        at sun.print.ServiceDialog$PageSetupPanel.updateInfo(ServiceDialog.java:1263)
        at sun.print.ServiceDialog.updatePanels(ServiceDialog.java:437)
        at sun.print.ServiceDialog.initPrintDialog(ServiceDialog.java:195)
        at sun.print.ServiceDialog.<init>(ServiceDialog.java:124)
        at javax.print.ServiceUI.printDialog(ServiceUI.java:188)
        at sun.print.RasterPrinterJob.printDialog(RasterPrinterJob.java:855)
        at com.haakh.stwWV.StwGuiWV.jMenuItemPrintActionPerformed(StwGuiWV.java:438)

StwGuiWV.java contains:
434            try {
435                pj.setPrintService(services[0]);
436                pj.setJobName("Druckausgabe");
437                pj.setPrintable(printable);
438                if (pj.printDialog(aset)==false) {
439                    return;
440                }
441                pj.print(aset);
442            } catch (java.awt.print.PrinterException pe) { ... }


javax.print.PrintService[] services contains two valid network-printers:
hp laserjet 2200d
Lexmark c543dn

It seems that in PrintServise, the orientation of the pages are undefined.
Neither explicit nor implicit. 

Ports related are:
/var/db/pkg/jdk-1.6.0.3p4_15/
/var/db/pkg/cups-base-1.4.3
/var/db/pkg/cups-client-1.4.3
/var/db/pkg/cups-image-1.4.3
/var/db/pkg/cups-pstoraster-8.15.4_6


>How-To-Repeat:
Set up an cups printing-environment containing only network-printers.
Try to print to them (see code above).
>Fix:
Define page-orientation in pps-Fils or teach cups or java-vm to provide a default.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005271253.o4RCrDa2057251>