[jcifs] Need some information about the error msg "The UID is not....

Michael B Allen mballen at erols.com
Sat Dec 22 09:24:13 EST 2001


On Fri, 21 Dec 2001 13:02:38 +0200
"Tsvetan Nachev" <ts_nachev at prosyst.bg> wrote:

> > > jcifs.smb.SmbException: The UID is not known as a valid user identifier
> on
> > > this session
> > >  at jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:625)
> > >  at jcifs.smb.SmbSession.sendTransaction(SmbSession.java:113)
> > >  at jcifs.smb.SmbTree.sendTransaction(SmbTree.java:52)
> > >  at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:408)
> > >  at jcifs.smb.SmbFile.list(SmbFile.java:919)
> > >  at jcifs.smb.SmbFile.list(SmbFile.java:907)

Tsvetan,

I've looked at the code and I don't see how this could happen. Is
it possible that you're using multiple threads on the *same* SmbFile
instance? If so, the SmbFile methods are not syncronized and you will
undoubtledly receive errors for doing such a thing. You either have to
make sure that each SmbFile is used by only one thread by just creating
and discarding each SmbFile instance as needed or by synchronizing the
code that operates on that instance. The first scenario is how jCIFS
is indented to be used. The trees, sessions, and transports are cached
so there is no reconnection associated with this. If you're not sure
about this, change the sendTransaction method in SmbFile.java to be
synchronized and see if the problem still occurs.

If this isn't your problem I'll send you some diagnostic patches that
will flip on logging for these operations. Incedentally, if the problem
does not take long to reproduce perhaps you can catch a -Dlog=ALL trace
of the problem (don't post it to the list though, send it to me directly
in compressed form pls).

Mike

-- 
May The Source be with you.




More information about the jcifs mailing list