[jcifs] NullPointerException in Dfs.resolve
martin.kutter at fen-net.de
Mon Apr 13 13:12:36 MDT 2015
I encountered a NullpointerException similar to
https://lists.samba.org/archive/jcifs/2012-January/009856.html - at
least the stack traces are similar.
My Environment (Client side):
- jcifs 1.3.18
- IBM JDK 7
- AIX 7.1
The NPE occured in a (in-house) plugin for the Jenkins build server. In
this system, JCIFs is used to recursively copy files from a Windows
share to an AIX machine.
Re-running a build shortly after it finished triggered the NPE.
After some debugging, it seems to me like the SmbFile’s underlying
transport is closed (by timeout), and when SmbFile.resolveDfs is called,
the transport is not reconnected (unlike, for example, later in
SmbFile.resolve, or in SmbSession.getChallenge).
I was able to reproduce the NPE during debugging using the following
- Trigger a build (recursively copying from a CIFS DFS tree)
- Wait until the transport objects disconnect by timeout (tracked by
- Retrigger the build (recursively copying the same directory structure)
The Jenkins plugin usually runs the second JCIFS copy operation in the
same thread than the first (though that's not guaranteed).
Each run uses a new SmbFile object.
Am I missing something (like some close operation on SmbFile)?
Is this a known error?
Can I do something to fix it?
More information about the jCIFS