Re: NullPointerException at listFiles
Michael B Allen <[email protected]> Thu, 8 May 2014 03:49:07 -0400
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGMFw4hg+6P1ft4EnCcf06m=VawS6AhNh9ckWKeus9qDWJMDeQ@mail.gmail.com> |
On Tue, Mar 4, 2014 at 6:21 AM, <[email protected]> wrote: > Hi All, > > We encountered the same problem as Dora reported. > https://lists.samba.org/archive/jcifs/2012-January/009856.html > > Then we used JCIFS-1.3.18b. > http://jcifs.samba.org/jcifs-1.3.18b.jar > > However this patch does not help us. > Any ideas? Hi Masakazu, This is not unlike NPEs also reported by Brett Johnson Oct 15, 2012 and Gabor Herr Mar 4, 2012. It seems this bit of code: connect0(); DfsReferral dr = dfs.resolve( tree.session.transport.tconHostName, tree.share, unc, auth); has a tendency for tree.session.transport.tconHostName to be null. But I have no idea why at this point. My guess is there's some kind of race where the transport is really not open even though connect0() is called successfully. Some kind of race I suppose. This is already on the TODO list. Unfortunately this looks like it will be quite difficult to replicate. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/ > <environment> > JCIFS : 1.3.18b > Network access : using DFS > > <stacktrace> > Caused by: java.lang.NullPointerException > at jcifs.smb.Dfs.resolve(Dfs.java:169) > at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:671) > at jcifs.smb.SmbFile.send(SmbFile.java:773) > at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1989) > at jcifs.smb.SmbFile.doEnum(SmbFile.java:1741) > at jcifs.smb.SmbFile.listFiles(SmbFile.java:1718) > at jcifs.smb.SmbFile.listFiles(SmbFile.java:1707) > > ---- > Thanks and Regards, > Masakazu Matsuura