[jcifs] NPE in SmbFile.listFiles with 1.2.18
Michael B Allen
miallen at ioplex.com
Tue Mar 4 17:08:06 GMT 2008
On Tue, 4 Mar 2008 10:30:33 -0500
"Patrick Madden" <PatrickMadden at clooster.com> wrote:
> Hi,
>
> I just upgraded my code to jcifs 1.2.18 from 1.2.17 and was running
> through some unit test code and ran into some issues.
>
> For example the SmbFile.listFiles() method throws a NPE when trying to
> use the DFS capabilities explained on the jcifs home page
>
> Assume I have a valid NTLMAuthentication instance when I call the
> following code:
>
> SmbFile smbHost = new SmbFile("smb://foo.local/", ntlmAuth);
>
> SmbFile[] allShares = smbHost.listFiles();
>
> java.lang.NullPointerException
> at jcifs.smb.SmbShareInfo.hashCode(SmbShareInfo.java:64)
> at java.util.HashMap.getEntry(Unknown Source)
> at java.util.HashMap.containsKey(Unknown Source)
> at jcifs.smb.SmbFile.doShareEnum(SmbFile.java:1697)
> at jcifs.smb.SmbFile.doEnum(SmbFile.java:1652)
> at jcifs.smb.SmbFile.listFiles(SmbFile.java:1631)
> at jcifs.smb.SmbFile.listFiles(SmbFile.java:1564)
> at
> com.clooster.jcifs.SmbFileTest.listShares(SmbFileTest.java:140)
> at com.clooster.jcifs.SmbFileTest.testDFS(SmbFileTest.java:75)
> at com.clooster.jcifs.SmbFileTest.main(SmbFileTest.java:159)
>
> The value of netname in the SmbShareInfo is null.
>
> Anyone have any ideas?
Hi Patrick,
I don't see how netName can be null unless some kind of fundamental
error is going on under the hood.
Please send the log of examples/ListFiles.java with jcifs.util.loglevel=3.
Also a capture would be great [1].
Mike
[1] http://jcifs.samba.org/capture.html
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the jcifs
mailing list