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 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(
at sun.print.ServiceDialog$OrientationPanel.updateInfo(
at sun.print.ServiceDialog$PageSetupPanel.updateInfo(
at sun.print.ServiceDialog.updatePanels(
at sun.print.ServiceDialog.initPrintDialog(
at sun.print.ServiceDialog.<init>(
at javax.print.ServiceUI.printDialog(
at sun.print.RasterPrinterJob.printDialog(
at com.haakh.stwWV.StwGuiWV.jMenuItemPrintActionPerformed( 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:

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
To unsubscribe, send any mail to " XXXX@XXXXX.COM "