【问题标题】:Network printer not visible to lookupPrintServices on Windows Server 2008 JBoss EAP 6.3.0Windows Server 2008 JBoss EAP 6.3.0 上的lookupPrintServices 看不到网络打印机
【发布时间】:2016-06-30 16:13:15
【问题描述】:

我有 JBoss EAP 6.3.0 作为 Windows 2008 服务在 Admin 组的 Active Directory 用户帐户下运行。网络打印机(型号 KONICA MINOLTA 423SeriesPS)通过 RDPing 连接到该用户,使用其帐户,然后通过其\\server\printerName 路径连接到打印机。这台打印机也被设为该用户的默认打印机。然后我启动 JBoss 服务并加载我的应用程序 EAR。它包含一个 WAR 文件,该文件使用 PrintServiceLookup.lookupPrintServices(null, null) 查找打印机。返回的唯一打印机是“Microsoft XPS Document Writer”。怎么了?

更新 我在 Windows 事件查看器中发现了这个错误。似乎不太可能相关,因为在创建该用户和打印机之前有很多这些,但它的价值:

The print spooler failed to load a plug-in module TPVMMon.dll, error code 0x7e See the event user data for context information.

【问题讨论】:

    标签: java printing jboss windows-server-2008-r2


    【解决方案1】:

    事实证明,这样配置的网络打印机不会可靠地出现在从 PrinterJob.lookupPrintServicesPrintServiceLookup.lookupPrintServices() 返回的打印机列表中,至少在带有 Java 1.7 的 Windows Server 2008 中是这样。 (奇怪的是,似乎确实存在网络打印机确实为本地系统以外的帐户显示的条件,但我还没有确定它们到底是什么。)为了让它们出现对任何 Active Directory 用户都可靠:

    1. 转到控制面板的设备和打印机面板
    2. 选择“添加”
    3. 指定“本地打印机”
    4. 指定“本地端口”
    5. 对于端口,输入网络打印机的 Windows 路径
    6. 完成向导

    以这种方式配置的网络打印机将始终显示。至少他们为我做了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-21
      • 2012-05-28
      • 2011-04-13
      • 1970-01-01
      • 2015-03-07
      • 2017-08-17
      相关资源
      最近更新 更多