-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
x86
-
linux_redhat_4.0
I am trying to print a GIF image from 2 different threads using DocPrintJob. When I run this on RHEL4-AMD64, I am getting an exception when printing from the second thread. The exception keep changings when running multiple times successively. However, the 2 exceptions given below are the ones that alternate. One of the exceptions claims that flavor is unsupported. But flavor is indeed supported -
java.lang.NullPointerException
at sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:841)
at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
at MultiThreadTest.print(MultiThreadTest.java:32)
at MultiThreadTest.run(MultiThreadTest.java:41)
sun.print.PrintJobFlavorException: invalid flavor
at sun.print.UnixPrintJob.print(UnixPrintJob.java:313)
at MultiThreadTest.print(MultiThreadTest.java:32)
at MultiThreadTest.run(MultiThreadTest.java:41)
This is reproducible on Mustang as well as Tiger-FCS. I reproduced it with Mustang-n73, b59g on RHEL4-AMD64. This does not happen when I use linux-i586 build and occurs only on linux-amd64 build.
I have attached a sample test and an image. Run the test passing the image file as an argument to the test. You will see the exception on the console. If it does not happen the first time, try running the test 2-3 times successively and you will see that exception when printer becomes busy.
java.lang.NullPointerException
at sun.print.IPPPrintService.findCustomMedia(IPPPrintService.java:841)
at sun.print.UnixPrintJob.print(UnixPrintJob.java:328)
at MultiThreadTest.print(MultiThreadTest.java:32)
at MultiThreadTest.run(MultiThreadTest.java:41)
sun.print.PrintJobFlavorException: invalid flavor
at sun.print.UnixPrintJob.print(UnixPrintJob.java:313)
at MultiThreadTest.print(MultiThreadTest.java:32)
at MultiThreadTest.run(MultiThreadTest.java:41)
This is reproducible on Mustang as well as Tiger-FCS. I reproduced it with Mustang-n73, b59g on RHEL4-AMD64. This does not happen when I use linux-i586 build and occurs only on linux-amd64 build.
I have attached a sample test and an image. Run the test passing the image file as an argument to the test. You will see the exception on the console. If it does not happen the first time, try running the test 2-3 times successively and you will see that exception when printer becomes busy.
- duplicates
-
JDK-4997933 REG: Printing from multiple threads throws Exception when printer is busy
- Closed
- relates to
-
JDK-6653384 Variable "initialized" in class CUPSPrinter is static by mistake
- Resolved