[jcifs] SmbFile.renameTo on DFS and ssnLimit=1

Torben Wölm torben.wolm at europe.lego.com
Mon May 15 12:37:41 GMT 2006


Hi all

I've run into this problem:

When renaming a file located on a DFS, I get an exception from line 1778 in SmbFile.java:

        if( tree != dest.tree ) {
            throw new SmbException( "Invalid operation for workgroups, servers, or shares" );
        }

I know this is caused by setting "jcifs.smb.client.ssnLimit" to "1". I run with this setting, since it is the only way I can get it to work from within an Oracle database (Java 1.3.something).

My guess is, that there is created a new SmbTree object for each of the SmbFile's in the renameTo call, and that causes (tree != dest.tree) to be true.

If I comment out the check, the rename works, so maybe there could be an overridden "equals"-method on SmbTree to check if the trees are equivalent instead of identical?

Sorry that I cannot provide a patch, but I'm not 100% sure of what SmbTree does and why the two trees are compared in the renameTo method. But I hope someone can use this input as a pointer?


Best regards,
torben


More information about the jcifs mailing list