title: javax.print.PrintException: Printer is not accepting job. On UNIX
body: <p>We have a Java application installed on WebSphere 8.5 on IBM AIX 6.1. We need to print some documents using this application.</p>
  
  <p>Currently we are getting this error:</p>
  
  <pre><code>ERROR syserr - javax.print.PrintException: Printer is not accepting job.
  
  ERROR syserr -  at sun.print.UnixPrintJob.print(UnixPrintJob.java:307)
  </code></pre>
  
  <p>Java version used is 6.</p>
  
  <p>We tried to find out solution online and found this link on Stackoverflow
  <a href="https://stackoverflow.com/questions/4547411/javax-print-printexception-printer-is-not-accepting-job">javax.print.PrintException: Printer is not accepting job</a></p>
  
  <p>Performed the same steps. But it did not help.</p>
  
  <p>We got this info also -</p>
  
  <p><a href="https://community.oracle.com/message/5449533" rel="nofollow noreferrer">https://community.oracle.com/message/5449533</a></p>
  
  <p>But since this solution was provided considering Windows machine, It did not work for us.</p>
  
  <p>After looking at the source code for UnixPrintJob.java, we realized that below part of code is causing this error:</p>
  
  <pre><code>    if ((PrinterIsAcceptingJobs)(service.getAttribute(
  
                        PrinterIsAcceptingJobs.class)) ==
  
                        PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {
  
           throw new PrintException("Printer is not accepting job."); 
       }
  </code></pre>
  
  <p>source : <a href="http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/print/UnixPrintJob.java" rel="nofollow noreferrer">http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/print/UnixPrintJob.java</a></p>
  
  <p>Could someone help and guide, why is this happening and what could be the solution ?</p>