[jcifs] NPE when trying to listFiles on SmbFile object

Jano Peti jano.peti at gmail.com
Tue Aug 4 01:22:40 MDT 2009

maybe I did not configure all stuff properly, 
but I look to examples and I think
I am doing it right.
I trying to connect to a remote disk which 
runs on windows server.

NtlmPasswordAuthentication ntlmauth = new
SmbFile smb = new SmbFile("smb://path/",ntlmauth);
SmbFile[] files = smb.listFiles();<-- I get here NPE:

String domain = dr.server.toLowerCase(); <-- dr is null

at jcifs.smb.Dfs.getTrustedDomains(Dfs.java:69)
at jcifs.smb.Dfs.resolve(Dfs.java:165)
at jcifs.smb.SmbFile.doConnect(SmbFile.java:890)
at jcifs.smb.SmbFile.connect(SmbFile.java:942)
at jcifs.smb.SmbFile.connect0(SmbFile.java:868)
at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:664)
at jcifs.smb.SmbFile.send(SmbFile.java:768)
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1972)
at jcifs.smb.SmbFile.doEnum(SmbFile.java:1724)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1701)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1634)
at smbTest.AustauschTest.testConnection(AustauschTest.java:28)


More information about the jcifs mailing list