Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-351

Small patch to not swallow SFTP exception from JSCH

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.1

    Description

      A customer had a stacktrace where the end of it looked something like this:

      Caused by: org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "***".
      at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:506)
      at org.apache.commons.vfs2.provider.sftp.SftpFileObject.refresh(SftpFileObject.java:92)
      ... 27 more
      Caused by: org.apache.commons.vfs2.FileSystemException: Could not change to work directory "/".
      at org.apache.commons.vfs2.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:144)
      at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:152)
      at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:115)
      at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:497)

      But SftpFileSystem actually got an exception from JSch that it did not set as cause for the newly created exception, making debugging harder.

      Attachments

        1. vfscdpatch.diff
          0.7 kB
          John Bäckstrand

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sandos John Bäckstrand
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment