commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Breu" <>
Subject AW: FYI: VFS/jcifs with windows shares (JDK 1.4.2_12)
Date Wed, 08 Nov 2006 08:39:22 GMT
I've now figured out the problems caused by JDK 1.4.2_12 + VFS/jcifs when
using smb.

JCifs uses in some classes encoding name "UnicodeLittle":
> jcifs/smb/ primaryDomain = new 
> String( buffer, bufferIndex, len, "UnicodeLittle" );
> jcifs/smb/ str = new String( src, srcIndex, len,
"UnicodeLittle" );
> jcifs/smb/   len, "UnicodeLittle" );
> jcifs/smb/  str = new String( src, 
> srcIndex, len, "UnicodeLittle" );

and treatment of this encoding name has been changed in JDK 1.4.2_12 (only
in that version, not in JDK 1.5.*): 

As it takes some time until a corrected jcifs version will be released, I
will create a patched jcifs version for my application, which uses encoding
name "UnicodeLittleUnmarked" instead of "UnicodeLittle". Or I maybe use

> UTF-16LE is the "standard" name for this encoding (required to 
> be supported in any JVM).  UnicodeLittleUnmarked is a Sun-specific 
> name (but is what UTF-16LE maps to internally):

Kind regards,

-----Urspr√ľngliche Nachricht-----
Von: Konstantin Breu [] 
Gesendet: Freitag, 27. Oktober 2006 10:17
An: ''
Betreff: FYI: VFS/jcifs with windows shares (JDK 1.4.2_12)

this is no direct question to the group, I just would like to forward a mail
we sent to the jcifs list.
Short Description: We have problems when connecting to smb shares of Windows
Servers with jcifs + JDK 1.4.2_12. As this also affects commons VFS (which
uses jcifs for smb) I send it to this list. In our tests, jcif clients
running with Windows + Linux were affected.
Kind Regards,

Hi all,

we recently switched to j2sdk1.4.2_12 and there we have a Problem fetching
contents of a share using jcifs. The problem doesn't exists in
j2sdk1.4.2_11 nor in jdk1.5.0_08 nor recent RC of 1.6.

I've attached a small test class demonstrating the problem. The class tries
to connect to a share passed as param (something like
"smb://user:pw@some.machine/some_share/") and lists the content. With all
jdks except 1.4.2_12 the result is ok, but with 1.4.2_12 something like this
is returned:

****** loop files
****** smb://x:x@some.server/webdav_test/?/
****** smb://x:x@some.server/webdav_test/??/
****** smb://x:x@some.server/webdav_test/???????????????
****** smb://x:x@some.server/webdav_test/????????????/
****** smb://x:x@some.server/webdav_test/??/
****** smb://x:x@some.server/webdav_test/??????????
****** smb://x:x@some.server/webdav_test/???????????????

I tried connections to (german) win2000 and win2003 server, both return the
result above. If connecting to a smb-server running on linux the result is
ok. I tried setting jcifs.encoding to different values (cp1252, utf8) but
without any success.

I checked the release notes of 1.4.2_12 but anything of the changes looks
like it affects this.

Any Ideas?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message