[jcifs] Incorrect canonical path

Michael B. Allen miallen at eskimo.com
Sun Aug 25 09:06:01 EST 2002


On Sat, 24 Aug 2002 17:16:58 -0400
Dan Diephouse <diephouse at eastnode.com> wrote:

> Michael B. Allen wrote:
> 
> >>I found a bug in SmbFile.getCanonicalPath() in 0.7.0b.  It will return 
> >>the canonical path without a "/" between the directory and the share. 
> >>For instance, it will return "smb://computer/sharedirectory/directory2" 
> >>instead of "smb://computer/share/directory/directory2".
> >>
> >
> >Did you ever isolate this issue Dan?
> >
> >
> I'm sorry, no I haven't. It is still on my list, but I got distracted by 
> a different project. You wouldn't believe what a PITA programming palm 
> devices in C is.

I  wrote  a  driver  for  a TI TMS320549 DSP plugged into a HandSpring as a
SpringBoard  module. I had to decode the TI object files, make a PDB out of
them,  load  the  PDB  in PalmOS, downloaded each continuous memory segment
through  the  HPI and then take the thing out of reset to run them. I think
it was 6 weeks before seeing the thing actually work. I learned a lot about
how  hardware  communicates  over the bus by addressing certain bits and so
on. It was a blast when it finally worked. 

> Since you reminded me, I would like to test it but I'm on a different 
> network for the moment. My only windows computer is my laptop (Windows 
> 2000), but I can't get it to be recognized by jcifs. I had no problem 
> with windows 98 and windows Me computers. I believe it has something to 
> do with authentication - my laptop requires a username and password to 
> see the shares on it.
> 
> I attached an output of the List example that was unsuccessful. Any 
> ideas? Promise that if I get this resolved I'll write up a test case to 
> see if I can reproduce my error. ;)
> 
> - Dan
> 
> Aug 24 17:13:56.332 - name service address cache
>  LAKE<1D> 0.0.0.0<00>/0.0.0.0
>  0.0.0.0<00> 0.0.0.0<00>/0.0.0.0
>  LAKE<20> LAKE<20>/169.254.25.129
>  JCIFS2_100_D3<20> JCIFS2_100_D3<20>/192.168.2.100
> 
> Exception in thread "main" jcifs.smb.SmbException: errno: 22, error: Invalid argument for fd: 4
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:467)
>         at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:655)
>         at jcifs.smb.SmbFile.setTree(SmbFile.java:478)
>         at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:487)
>         at jcifs.smb.SmbFile.list(SmbFile.java:1025)
>         at List.main(List.java:31)

Well,  it found LAKE<20> no problem. But during negotiation it's choking in
a  low  level  way. Errno 22 is "Invalid argument" on my Linux machine. Can
you  connect  by other means? Using smbclient/explorer or whatever? Can you
telnet  lake 139? It's strange that LAKE would respond to the name query ok
but  choke on the negotiation. Try setting laddr=192.168.2.xxx where xxx is
your  last octet maybe. Anything unusal about your network? I'd have to see
an Ethereal trace to go further. 

-- 
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 importantly to tasks that have not
yet been conceived. 



More information about the jcifs mailing list