1

In a Domino Java agent, I am accessing a shared drive that requires authentication using the JCIFS library, and have managed to access the file and loop through it. However, I keep getting a message in the server logs "Error cleaning up agent threads". I've added some code to show what is happening with the threads, but don't really know what else I can close or recycle.

Here is the code and server log. I've commented out the processing of the file, however the message still appears with the commented out code.

CODE SNIPPET:

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);

SERVER LOG:

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

Kian W
  • 11
  • 3

1 Answers1

0

JCIFS starts a couple of threads (as you can see in the thread dump). If these threads are still running when the agent main thread ends, Domino prints the "cleaning up..." error. If I remember correctly you only need to give JCIFS a couple of seconds to shut down its threads. You could use a loop that sleeps for a second until all JCIFS threads have terminated. Or just do a sleep for a fixed period, that should do it, too.

Dietmar Höhmann
  • 397
  • 3
  • 10