-
Bug
-
Resolution: Fixed
-
P3
-
7, 8
-
unix
-
b06
-
solaris
I have a single ipp printer on a Unix machine.
lpstat -v returns for me something like
device for printername: ipp://xx.xxx.xx.xx:631
Now, running several of the old image-printing 2D tests, I'm getting this exception:
javax.print.PrintException: java.lang.ClassCastException: sun.print.IPPPrintService cannot be cast to sun.print.UnixPrintService
at sun.print.UnixPrintJob.print(UnixPrintJob.java:418)
at EventHandling.print(EventHandling.java:279)
at EventHandling.start(EventHandling.java:168)
etc., because of the cast in line 413
Looking in the code, we see in UnixPrintJob.java at line 409:
if (!(service instanceof IPPPrintService &&
((IPPPrintService)service).isIPPSupportedImages(
flavor.getMimeType()))) {
printableJob(new ImagePrinter(instream));
((UnixPrintService)service).wakeNotifier();
return;
}
Apparently, I have an IPP print service which doesn't support certain given mime type.
lpstat -v returns for me something like
device for printername: ipp://xx.xxx.xx.xx:631
Now, running several of the old image-printing 2D tests, I'm getting this exception:
javax.print.PrintException: java.lang.ClassCastException: sun.print.IPPPrintService cannot be cast to sun.print.UnixPrintService
at sun.print.UnixPrintJob.print(UnixPrintJob.java:418)
at EventHandling.print(EventHandling.java:279)
at EventHandling.start(EventHandling.java:168)
etc., because of the cast in line 413
Looking in the code, we see in UnixPrintJob.java at line 409:
if (!(service instanceof IPPPrintService &&
((IPPPrintService)service).isIPPSupportedImages(
flavor.getMimeType()))) {
printableJob(new ImagePrinter(instream));
((UnixPrintService)service).wakeNotifier();
return;
}
Apparently, I have an IPP print service which doesn't support certain given mime type.