org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......".

Apache's JIRA Issue Tracker | Harald Brabenetz | 10 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The error occured after restarting if the SFTP-Server was KILLed!!. With a normal shutdown of the SFTP-Server, no exception after restarting occured. I found no function to force the reset of the session in SftpFileSystem.java There is a function: DefaultFileSystemManager manager = (DefaultFileSystemManager)VFS.getManager(); manager.freeUnusedResources(); But this works only if AbstractFileSystem.isReleaseable() returns true. And this this function return only true if all SFTP-FileObject are removed from the GarbageCollection (finally()-Methode). I cannot force a GarbageCollection. So there is no way to handle this Error! I must restart the VM (ServletContainer). org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......". at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.exportChatMessages(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.startExportNow(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl$ExportManagerRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.commons.vfs.FileSystemException: Could not write to "sftp://chat:chat@10.1.5.130/home/chat/chatfile_12.zip". at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1227) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356) at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100) at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893) ... 4 more Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://chat:chat@10.1.5.130/". at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144) at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:402) at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219) ... 8 more Caused by: com.jcraft.jsch.JSchException: session is down at com.jcraft.jsch.Session.openChannel(Session.java:756) at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:122) ... 10 more

    Apache's JIRA Issue Tracker | 10 years ago | Harald Brabenetz
    org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......".
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    The error occured after restarting if the SFTP-Server was KILLed!!. With a normal shutdown of the SFTP-Server, no exception after restarting occured. I found no function to force the reset of the session in SftpFileSystem.java There is a function: DefaultFileSystemManager manager = (DefaultFileSystemManager)VFS.getManager(); manager.freeUnusedResources(); But this works only if AbstractFileSystem.isReleaseable() returns true. And this this function return only true if all SFTP-FileObject are removed from the GarbageCollection (finally()-Methode). I cannot force a GarbageCollection. So there is no way to handle this Error! I must restart the VM (ServletContainer). org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......". at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:902) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.exportChatMessages(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl.startExportNow(Unknown Source) at com.bearingpoint.orf.chat.core.service.ExportManagerImpl$ExportManagerRunnable.run(Unknown Source) at java.lang.Thread.run(Thread.java:595) Caused by: org.apache.commons.vfs.FileSystemException: Could not write to "sftp://chat:chat@10.1.5.130/home/chat/chatfile_12.zip". at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1227) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373) at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356) at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100) at org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893) ... 4 more Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://chat:chat@10.1.5.130/". at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144) at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:402) at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219) ... 8 more Caused by: com.jcraft.jsch.JSchException: session is down at com.jcraft.jsch.Session.openChannel(Session.java:756) at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:122) ... 10 more

    Apache's JIRA Issue Tracker | 10 years ago | Harald Brabenetz
    org.apache.commons.vfs.FileSystemException: Could not copy "file:///C:/TEMP/....." to "sftp://......".
  4. 0

    use of Jsch sudo example and channel.setpty for running sudo command on remote host

    Stack Overflow | 5 years ago | waqas
    com.jcraft.jsch.JSchException: session is down

  1. jstrayer 1 times, last 2 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.jcraft.jsch.JSchException

    session is down

    at com.jcraft.jsch.Session.openChannel()
  2. JSch
    Session.openChannel
    1. com.jcraft.jsch.Session.openChannel(Session.java:756)
    1 frame
  3. Commons VFS
    AbstractFileObject.copyFrom
    1. org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:122)
    2. org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetOutputStream(SftpFileObject.java:402)
    3. org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219)
    4. org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373)
    5. org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:356)
    6. org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:100)
    7. org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:893)
    7 frames
  4. com.bearingpoint.orf
    ExportManagerImpl$ExportManagerRunnable.run
    1. com.bearingpoint.orf.chat.core.service.ExportManagerImpl.exportChatMessages(Unknown Source)
    2. com.bearingpoint.orf.chat.core.service.ExportManagerImpl.startExportNow(Unknown Source)
    3. com.bearingpoint.orf.chat.core.service.ExportManagerImpl$ExportManagerRunnable.run(Unknown Source)
    3 frames
  5. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:595)
    1 frame