[jcifs] SmbFile("smb://") problem.

Christopher R. Hertel crh at ubiqx.mn.org
Sat May 29 19:03:59 GMT 2004


On Sat, May 29, 2004 at 04:54:55PM +0000, David Emo. wrote:
> Hi, first i'd like to thank for your great job. It's really powerfull and 
> usefull. 
> I have some problem with the line :
> SmbFile smbf = new SmbFile("smb://");
> smbf.list();
> It causes a exception like that :
> jcifs.smb.SmbException: Failed to connect to server
> java.net.UnknownHostException: ..__MSBROWSE__.<01>
> 
> I try :
> SmbFile smbf = new SmbFile("smb://MYWORKGROUP/");
> smbf.list();
> It causes a exception like that :
> jcifs.smb.SmbException: smb://MYWORKGROUP/
> java.net.UnknownHostException: MYWORKGROUP

That means that there is no Local Master Browser on your local network 
*OR* that you have disabled broadcast name resolution and there's no 
Domain Master Browser.

> With ;
> SmbFile smbf = new SmbFile("smb://Computer1/");
> smbf.list();
> i got the good result but it misses a directory in the list (a directory 
> called "Projets Annexes" and when i do :

I *think* that's because the NetShareEnum3 call places a limit of 13 bytes 
(including nul terminator) on the names of directories it returns.  What 
type of server is it?  It should provide a mangled directory name 
(shortened to 8.3 format).

> SmbFile smbf = new SmbFile("smb://MYWORKGROUP/Projets Annexes/");
> smbf.list();
> I can list the different shared files.
> SO if you can give an explaination to help me to understand my problem.
> Thanks a lot.  

Are you sure you're calling for MYWORKGROUP and not COMPUTER1?

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the jcifs mailing list