[jcifs] Random problems connecting to DFS server

Gabor Herr gabor.e.herr at googlemail.com
Fri Apr 20 06:15:11 MDT 2012


Hi Mike,

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.

Gabor
 Am 19.04.2012 17:51 schrieb "Michael B Allen" <ioplex at gmail.com>:

> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20120420/5ee238b1/attachment.html>


More information about the jCIFS mailing list