[jcifs] Incorrect canonical path
Dan Diephouse
diephouse at eastnode.com
Sun Aug 25 07:16:58 EST 2002
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.
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
ocean:32[/home/dan/WDev/jcifs_0.7.0b/examples]$ /usr/local/linux-jdk1.3.1/bin/java -classpath $CLASSPATH:../jcifs-0.7.0b.jar -Dbaddr=192.168.2.255 -Dlog=All List smb://lake
#properties loaded
#Sat Aug 24 17:13:49 EDT 2002
baddr=192.168.2.255
log=All
java.compiler=NONE
java.version=1.3.1_01
java.home=/usr/local/linux-jdk1.3.1/jre
java.ext.dirs=/usr/local/linux-jdk1.3.1/jre/lib/ext
java.vm.version=1.3.1_01
java.vm.name=Classic VM
java.vm.info=green threads, nojit
java.vm.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.class.version=47.0
java.class.path=.:/usr/local/jdk/lib/tools.jar::../jcifs-0.7.0b.jar
java.runtime.version=1.3.1_01
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.specification.version=1.3
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.io.tmpdir=/tmp
java.awt.printerjob=sun.awt.motif.PSPrinterJob
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.fonts=
java.library.path=/usr/local/linux-jdk1.3.1/jre/lib/i386:/usr/local/linux-jdk1.3.1/jre/lib/i386/green_threads/:/usr/local/linux-jdk1.3.1/jre/lib/i386/classic:/usr/local/linux-jdk1.3.1/jre/../lib/i386:/usr/lib:/lib
java.vendor.url=http://java.sun.com/
java.protocol.handler.pkgs=jcifs
file.separator=/
file.encoding.pkg=sun.io
os.version=2.4.2
os.name=Linux
os.arch=i386
user.name=dan
user.dir=/usr/home/dan/WDev/jcifs_0.7.0b/examples
user.timezone=
user.region=US
user.home=/home/dan
user.language=en
sun.boot.library.path=/usr/local/linux-jdk1.3.1/jre/lib/i386
sun.boot.class.path=/usr/local/linux-jdk1.3.1/jre/lib/rt.jar:/usr/local/linux-jdk1.3.1/jre/lib/i18n.jar:/usr/local/linux-jdk1.3.1/jre/lib/sunrsasign.jar:/usr/local/linux-jdk1.3.1/jre/classes
sun.cpu.endian=little
sun.cpu.isalist=
sun.io.unicode.encoding=UnicodeLittle
path.separator=:
line.separator=\n
Aug 24 17:13:50.190 - name service address cache
0.0.0.0<00> 0.0.0.0<00>/0.0.0.0
JCIFS2_100_D3<20> JCIFS2_100_D3<20>/192.168.2.100
Aug 24 17:13:50.253 - nbt name service packet sent
NameQueryRequest[nameTrnId=1,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=LAKE<1D>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
Aug 24 17:13:50.292 - datagram packet sent to: 192.168.2.255
00000: 00 01 01 10 00 01 00 00 00 00 00 00 20 45 4D 45 |............ EME|
00010: 42 45 4C 45 46 43 41 43 41 43 41 43 41 43 41 43 |BELEFCACACACACAC|
00020: 41 43 41 43 41 43 41 43 41 43 41 42 4E 00 00 20 |ACACACACACABN.. |
00030: 00 01 |.. |
Aug 24 17:13:50.312 - nbt name service packet sent
NameQueryRequest[nameTrnId=2,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=LAKE<20>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
Aug 24 17:13:50.332 - datagram packet sent to: 192.168.2.255
00000: 00 02 01 10 00 01 00 00 00 00 00 00 20 45 4D 45 |............ EME|
00010: 42 45 4C 45 46 43 41 43 41 43 41 43 41 43 41 43 |BELEFCACACACACAC|
00020: 41 43 41 43 41 43 41 43 41 43 41 43 41 00 00 20 |ACACACACACACA.. |
00030: 00 01 |.. |
Aug 24 17:13:50.342 - nbt name service debugging
new data read from socket
Aug 24 17:13:50.384 - nbt name service packet receviced
NameQueryResponse[nameTrnId=2,isResponse=true,opCode=QUERY,isAuthAnswer=true,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=false,resultCode=0,questionCount=0,answerCount=1,authorityCount=0,additionalCount=0,questionName=null,questionType=0x0000,questionClass=IN,recordName=LAKE<20>,recordType=0x0020,recordClass=IN,ttl=300000,rDataLength=12,addrEntry=LAKE<20>/169.254.25.129]
Aug 24 17:13:50.387 - datagram packet received from: 192.168.2.101
00000: 00 02 85 00 00 00 00 01 00 00 00 00 20 45 4D 45 |............ EME|
00010: 42 45 4C 45 46 43 41 43 41 43 41 43 41 43 41 43 |BELEFCACACACACAC|
00020: 41 43 41 43 41 43 41 43 41 43 41 43 41 00 00 20 |ACACACACACACA.. |
00030: 00 01 00 04 93 E0 00 0C 60 00 A9 FE 19 81 60 00 |.....?..`.??..`.|
00040: C0 A8 02 65 |??.e |
Aug 24 17:13:50.391 - name service address cache
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
Aug 24 17:13:50.469 - smb negotiation warning
requesting negotiation with LAKE<20>/169.254.25.129
Aug 24 17:13:53.322 - nbt name service packet sent
NameQueryRequest[nameTrnId=3,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=LAKE<1D>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
Aug 24 17:13:53.325 - datagram packet sent to: 192.168.2.255
00000: 00 03 01 10 00 01 00 00 00 00 00 00 20 45 4D 45 |............ EME|
00010: 42 45 4C 45 46 43 41 43 41 43 41 43 41 43 41 43 |BELEFCACACACACAC|
00020: 41 43 41 43 41 43 41 43 41 43 41 42 4E 00 00 20 |ACACACACACABN.. |
00030: 00 01 |.. |
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)
--
Dan Diephouse
http://eastnode.com
More information about the jcifs
mailing list