【问题标题】:javax.print.PrintException: Printer is not accepting job. On UNIXjavax.print.PrintException:打印机不接受作业。在 UNIX 上
【发布时间】:2015-10-26 15:08:41
【问题描述】:

我们在 IBM AIX 6.1 上的 WebSphere 8.5 上安装了一个 Java 应用程序。我们需要使用这个应用程序打印一些文件。

目前我们收到此错误:

ERROR syserr - javax.print.PrintException: Printer is not accepting job.

ERROR syserr -  at sun.print.UnixPrintJob.print(UnixPrintJob.java:307)

使用的Java版本是6。

我们试图在网上找到解决方案,并在 Stackoverflow 上找到了这个链接 javax.print.PrintException: Printer is not accepting job

执行相同的步骤。但这并没有帮助。

我们也得到了这个信息 -

https://community.oracle.com/message/5449533

但是由于这个解决方案是考虑到 Windows 机器提供的,它对我们不起作用。

查看 UnixPrintJob.java 的源代码后,我们意识到以下部分代码导致了此错误:

    if ((PrinterIsAcceptingJobs)(service.getAttribute(

                      PrinterIsAcceptingJobs.class)) ==

                      PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS) {

         throw new PrintException("Printer is not accepting job."); 
     }

来源:http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/print/UnixPrintJob.java

有人可以帮助和指导,为什么会发生这种情况以及解决方案是什么?

【问题讨论】:

    标签: java printing aix


    【解决方案1】:

    遇到类似问题,发现与非root用户无法访问的qdaemon服务有关。检查非root用户是否可以使用lpstat查询服务器上定义的打印队列。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-04
    • 1970-01-01
    • 2018-09-27
    • 1970-01-01
    • 2019-10-24
    • 1970-01-01
    相关资源
    最近更新 更多