[jcifs] CIFS oddities: Novell/jCIFS/smbclient

Michael B. Allen miallen at eskimo.com
Fri Dec 27 14:51:14 EST 2002


On Thu, 26 Dec 2002 19:22:19 -0600
"Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:

> On Thu, Dec 26, 2002 at 06:13:48PM -0500, Michael B. Allen wrote:
> :
> > The below URLs need a trailing slash.
> 
> Tried both ways, no difference in either case.  The first one causes the 
> exception with or without the slash.  The second lists files and 
> directories...with or without.
> 
> Against a Samba server, I can perform the same types of actions and--once 
> again--the trailing slash doesn't make any practical difference.  Against 
> Samba, however, the general form
> 
>   java List smb://userinfo@hostport/share[/]
> 
> works just fine.
> 
> I'll have to look at the RFCs again.  I'm not sure what they have to say 
> about the placement of trailing slashes.  Hmmm...

I didn't mean it was the source of the problem you encountered. The jCIFS
client requires a trailing slash with directories. It just so happens
the List example does not provoke a problem but just about any really
siginificant work will (e.g. SmbShell). I just wanted to clarify for
the sake of others on this list that the trailing slash is absolutely
required by jCIFS. Without a trailing slash, the resource refers to a
file and therefore cannot be list()ed.

> 
> Chris -)-----
> 
> > > $ java List smb://domain\;crh:p%40ssw0rd@server/USERS
> > > Exception in thread "main" jcifs.smb.SmbException: File not found
> > >         at jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:630)
> > >         at jcifs.smb.SmbSession.sendTransaction(SmbSession.java:78)
> > >         at jcifs.smb.SmbTree.sendTransaction(SmbTree.java:66)
> > >         at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:443)
> > >         at jcifs.smb.SmbFile.list(SmbFile.java:1129)
> > >         at jcifs.smb.SmbFile.list(SmbFile.java:1117)
> > >         at List.main(List.java:31)
> > > 
> > > $ java List smb://domain\;crh:p%40ssw0rd@server/USERS/CRH
> > >  Created_on_MAC foo.txt Novell_NetShareEnum.cap.gz resource.frk
> > > 4 files in 376ms
> 
> -- 
> 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


-- 
A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 



More information about the jcifs mailing list