You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2014/05/01 19:15:18 UTC
[jira] [Commented] (SSHD-257) UnsupportedOperationException from
ScpClient.upload on Windows 7
[ https://issues.apache.org/jira/browse/SSHD-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986778#comment-13986778 ]
Will Glass-Husain commented on SSHD-257:
----------------------------------------
Hi,
I'm still seeing errors with windows/Java 7 when uploading files. It appears to be properly using NativeSshFile, but that causes errors when setting attributes. (v 0.11)
10:10:02.221 [Thread-7] ERROR o.a.sshd.server.sftp.SftpSubsystem - Exception caught in SFTP subsystem
java.lang.UnsupportedOperationException: null
at org.apache.sshd.common.file.nativefs.NativeSshFile.setAttributes(NativeSshFile.java:644) ~[sshd-core-0.11.0.jar:0.11.0]
at org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:427) ~[sshd-core-0.11.0.jar:0.11.0]
at org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334) ~[sshd-core-0.11.0.jar:0.11.0]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
> UnsupportedOperationException from ScpClient.upload on Windows 7
> ----------------------------------------------------------------
>
> Key: SSHD-257
> URL: https://issues.apache.org/jira/browse/SSHD-257
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 0.9.0
> Environment: Windows 7 SP1 with Java 1.7.21
> Reporter: Jeff Horrigan
> Assignee: Guillaume Nodet
> Fix For: 0.10.0
>
>
> NativeSshFileNio.getAttributes uses Files.readAttributes and references unix:size which apparently doesn't exist on windows making the scp client unusable on windows.
> Exception in thread "main" java.lang.UnsupportedOperationException: View 'unix' not available
> at sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:91)
> at java.nio.file.Files.readAttributes(Files.java:1902)
> at org.apache.sshd.common.file.nativefs.NativeSshFileNio.getAttributes(NativeSshFileNio.java:58)
> at org.apache.sshd.common.scp.ScpHelper.sendFile(ScpHelper.java:324)
> at org.apache.sshd.common.scp.ScpHelper.send(ScpHelper.java:305)
> at org.apache.sshd.client.scp.DefaultScpClient.upload(DefaultScpClient.java:156)
> at org.apache.sshd.client.scp.DefaultScpClient.upload(DefaultScpClient.java:115)
--
This message was sent by Atlassian JIRA
(v6.2#6252)