<p>Hi Mike,</p>
<p>I've just tried your suggested workaround with my test case. Unfortunately it does not fix the problem. It looks like some method called from Dfs.resolve gets delayed (maybe waiting for some server response) and in the meanwhile tconHostname is set to null. </p>

<p>Gabor<br>
</p>
<div class="gmail_quote">Am 19.04.2012 17:51 schrieb "Michael B Allen" <<a href="mailto:ioplex@gmail.com" target="_blank">ioplex@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On Tue, Apr 17, 2012 at 5:17 PM, Gabor Herr <<a href="mailto:gabor.e.herr@googlemail.com" target="_blank">gabor.e.herr@googlemail.com</a>> wrote:<br>
> I don't know about any bug tracker for jcifs, so hopefully Mike has noticed<br>
> this post...<br>
<br>
There is a bug tracker. But it's just a web-based sortable "TODO list"<br>
that only I have access to. If someone wants to +1 something just do<br>
it on the list.<br>
<br>
But this NPE is already listed high on the TODO list and, as I eluded<br>
to in my initial response, the proposed "patch" is absolutely not<br>
correct. I will have to investigate how the tconHostName can be null<br>
after connect0 was called successfully.<br>
<br>
A safer workaround for now might be to try something in<br>
SmbFile.java:isConnected() like:<br>
<br>
  return tree != null && tree.connectionState == 2 &&<br>
tree.session.transport.tconHostName != null;<br>
<br>
The rational is that if tconHostName is null, something called<br>
doDisconnect so isConnected should probably return false. Then again,<br>
if this is a concurrency issue this "workaround" could just cause the<br>
code to go around in circles.<br>
<br>
Mike<br>
<br>
--<br>
Michael B Allen<br>
Java Active Directory Integration<br>
<a href="http://www.ioplex.com/" target="_blank">http://www.ioplex.com/</a><br>
</blockquote></div>