[jcifs] Random problems connecting to DFS server

Michael B Allen ioplex at gmail.com
Thu Apr 19 09:51:13 MDT 2012


On Tue, Apr 17, 2012 at 5:17 PM, Gabor Herr <gabor.e.herr at googlemail.com> wrote:
> I don't know about any bug tracker for jcifs, so hopefully Mike has noticed
> this post...

There is a bug tracker. But it's just a web-based sortable "TODO list"
that only I have access to. If someone wants to +1 something just do
it on the list.

But this NPE is already listed high on the TODO list and, as I eluded
to in my initial response, the proposed "patch" is absolutely not
correct. I will have to investigate how the tconHostName can be null
after connect0 was called successfully.

A safer workaround for now might be to try something in
SmbFile.java:isConnected() like:

  return tree != null && tree.connectionState == 2 &&
tree.session.transport.tconHostName != null;

The rational is that if tconHostName is null, something called
doDisconnect so isConnected should probably return false. Then again,
if this is a concurrency issue this "workaround" could just cause the
code to go around in circles.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list