[jcifs] Problem with large file copies

Hite, Sharon (NIH/NIEHS) [E] hite1 at niehs.nih.gov
Mon Apr 23 18:26:25 GMT 2007


Please forgive a JCIFS newbie question.  I have a multi-threaded
application on a server that validates files and then copies them from
one Samba server to another and then writes a message to a log.  It
works well for smaller files.  However, when I try to copy very large
files (greater than 6 Meg or so), it copies the file, but then never
writes the message to the log.  If there are more files in the batch,
they don't get copied.  That processing thread just seems to disappear
with no errors.  Subsequent threads will process correctly as long as
the file is not too large.  Here are the relevant parts of the code:

 

>From the initialization process

        // Load the authentication information into the JCIFS properties

        appLog.debug("Initializing JCIFS");

        jcifs.Config.setProperty( "jcifs.netbios.client.writeSize",
"65535");

        jcifs.Config.setProperty( "jcifs.netbios.client.snd_buf_size",
"60416");

        jcifs.Config.setProperty("jcifs.smb.lmCompatibility","3"); 

        jcifs.Config.setProperty("jcifs.netbios.wins",props.getIp());

 
jcifs.Config.setProperty("jcifs.smb.client.username",props.getUsername()
);

 
jcifs.Config.setProperty("jcifs.smb.client.password",props.getPassword()
);

 
jcifs.Config.setProperty("jcifs.smb.client.domain",props.getDomain());

 

>From the code that copies the file:

        SmbFile srcFile = new SmbFile(srcFileName);

        SmbFile destFile = new SmbFile(destFileName);

        srcFile.copyTo(destFile);

        appLog.debug("Thread " + threadNum + ":  " + srcFileName + "
copied to " + destFileName);

 

Is there some other process I should be using to copy these large files?
Since no errors are thrown, I'm at a loss to figure out how to
troubleshoot this problem.

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list