piaosama / ganymed-ssh-2

Automatically exported from code.google.com/p/ganymed-ssh-2
Other
0 stars 0 forks source link

sftp: The server sent an invalid id field #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using build 261 and getting the following exception.

cd: cwd=/home/campbell/outgoing/to_xsb/test
put: absPath=/home/campbell/outgoing/to_xsb/test/f1
numBytesRead=7, offset=0
numBytesRead=-1, offset=7
put: absPath=/home/campbell/outgoing/to_xsb/test/f2
Exception in thread "main" java.io.IOException: The server sent an invalid id 
field.
    at ch.ethz.ssh2.SFTPv3Client.openFile(SFTPv3Client.java:1233)
    at ch.ethz.ssh2.SFTPv3Client.createFileTruncate(SFTPv3Client.java:1148)
    at ch.ethz.ssh2.SFTPv3Client.createFileTruncate(SFTPv3Client.java:1129)
    at sftp.put(sftp.java:59)
    at sftp.main(sftp.java:106)

Test code is attached.

Original issue reported on code.google.com by rossolin...@gmail.com on 25 Oct 2013 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
You have to close the file handle after writing with 
sftpClient.closeFile(fileHandle).

Original comment by dkocher@sudo.ch on 9 Apr 2014 at 7:39