java - Geting Exception Bad Message when rename file on SFTP server using JSch -


i trying move file 1 directory on sftp using jsch . have used rename method getting below exception(5: bad message):

    channeldes = session.openchannel("sftp");     channeldes.connect();     sftpchanneldes = (channelsftp) channeldes;      string sourcepath = "./abc/" + filename;     string destinationpath = "./xyz/" + filename;      sftpchanneldes.rename(sourcepath, destinationpath);       **exception :-**     =================           5: bad message           @ com.jcraft.jsch.channelsftp.throwstatuserror(channelsftp.java:2846)           @ com.jcraft.jsch.channelsftp.rename(channelsftp.java:1923)           @ com.test.copyfile.movefile(copyfile.java:56)           @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)           @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)           @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)           @ java.lang.reflect.method.invoke(method.java:606) 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -