【问题标题】:Domino Java agent using JCIFS - Error cleaning up agent threads使用 JCIFS 的 Domino Java 代理 - 清理代理线程时出错
【发布时间】:2015-05-27 07:16:56
【问题描述】:

在 Domino Java 代理中,我正在访问需要使用 JCIFS 库进行身份验证的共享驱动器,并且已设法访问该文件并循环访问该文件。但是,我在服务器日志中不断收到一条消息“清理代理线程时出错”。我已经 added some code 显示线程发生了什么,但我真的不知道我还能关闭或回收什么。

这是代码和服务器日志。我已经注释掉了文件的处理过程,但是消息仍然会显示注释掉的代码。

代码片段:

NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("testdomain", "test user", "password"); SmbFile csvImportFile = new SmbFile("smb://sap/general/"+ filePattern, auth); Reader reader = new InputStreamReader(csvImportFile.getInputStream()); /* process file */ reader.close(); System.out.println("Dump the current threadgroup:\n"); dumptg(null);

服务器日志:

27/05/2015 05:03:42 PM HTTP JVM: Dump the current threadgroup: 27/05/2015 05:03:42 PM HTTP JVM: ThreadGroup UTG: JavaAgent, objid = 982530704 27/05/2015 05:03:42 PM HTTP JVM: subgroups = 0 27/05/2015 05:03:42 PM HTTP JVM: total threads = 6 27/05/2015 05:03:42 PM HTTP JVM: Thread Name, ThreadID, ThreadGroup 27/05/2015 05:03:42 PM HTTP JVM: JCIFS-QueryThread: testdomain, 587342594, UTG: JavaAgent 27/05/2015 05:03:42 PM HTTP JVM: Transport1, 1880453141, UTG: JavaAgent 27/05/2015 05:03:42 PM HTTP JVM: Transport2, 621094149, UTG: JavaAgent 27/05/2015 05:03:42 PM HTTP JVM: JCIFS-NameServiceClient, 1103184321, UTG: JavaAgent 27/05/2015 05:03:42 PM HTTP JVM: JCIFS-QueryThread: testdomain, 342692973, UTG: JavaAgent 27/05/2015 05:03:42 PM HTTP JVM: AgentThread: JavaAgent, 279056546, UTG: JavaAgent 27/05/2015 05:03:43 PM HTTP JVM: Error cleaning up agent threads

【问题讨论】:

    标签: java multithreading lotus-domino jcifs agents


    【解决方案1】:

    JCIFS 启动了几个线程(正如您在线程转储中看到的那样)。如果代理主线程结束时这些线程仍在运行,Domino 会打印“cleaning up...”错误。如果我没记错的话,你只需要给 JCIFS 几秒钟的时间来关闭它的线程。您可以使用一个休眠一秒钟的循环,直到所有 JCIFS 线程都终止。或者只是睡一段固定的时间,也应该这样做。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-01
      • 2015-09-06
      相关资源
      最近更新 更多