commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Breu" <Konstantin.B...@gmx.net>
Subject AW: FYI: VFS/jcifs with windows shares (JDK 1.4.2_12)
Date Wed, 08 Nov 2006 08:39:22 GMT
Hi,
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/SmbComSessionSetupAndXResponse.java: primaryDomain = new 
> String( buffer, bufferIndex, len, "UnicodeLittle" );
> jcifs/smb/ServerMessageBlock.java: str = new String( src, srcIndex, len,
"UnicodeLittle" );
> jcifs/smb/SmbComNegotiateResponse.java:   len, "UnicodeLittle" );
> jcifs/smb/Trans2FindFirst2Response.java:  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.*):
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6448787 

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:

> 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):
> http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

Kind regards,
Konstantin


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

Hello,
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,
Konstantin


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?

Ingo




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message