java/147129: Printing to cups-network-printer fails with null-pointer-exception

java/147129: Printing to cups-network-printer fails with null-pointer-exception

Post by bugReporte » Fri, 28 May 2010 21:53:13



Ingenieurbo Haakh
FreeBSD Crabberio.Haakh.de 8.0-STABLE FreeBSD 8.0-STABLE #46: Thu Apr 22 12:44:27 CEST 2010 XXXX@XXXXX.COM :/usr/obj/usr/src/sys/CRABBERIO amd64

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


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

_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "