You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bela Hullar (JIRA)" <ji...@apache.org> on 2014/01/20 13:39:38 UTC

[jira] [Created] (VFS-510) moveTo fails with SFTPFileObject if CacheStrategy.ON_CALL is set

Bela Hullar created VFS-510:
-------------------------------

             Summary: moveTo fails with SFTPFileObject if CacheStrategy.ON_CALL is set
                 Key: VFS-510
                 URL: https://issues.apache.org/jira/browse/VFS-510
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Bela Hullar


calling moveTo on SFTPFileObject cause the following error:
java.lang.ClassCastException: org.apache.commons.vfs2.cache.OnCallRefreshFileObject cannot be cast to org.apache.commons.vfs2.provider.sftp.SftpFileObject
	at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doRename(SftpFileObject.java:289) ~[commons-vfs2-2.0.jar:2.0]
	at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1102) ~[commons-vfs2-2.0.jar:2.0]
	at org.apache.commons.vfs2.impl.DecoratedFileObject.moveTo(DecoratedFileObject.java:155) ~[commons-vfs2-2.0.jar:2.0]
	at org.apache.commons.vfs2.cache.OnCallRefreshFileObject.moveTo(OnCallRefreshFileObject.java:158) ~[commons-vfs2-2.0.jar:2.0]
	at ch.systemsx.bee.workflowmanager.tasks.RetryableTask.handleGeneratedFiles(RetryableTask.java:104) [bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.workflowmanager.tasks.RetryableTask.access$000(RetryableTask.java:24) [bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.workflowmanager.tasks.RetryableTask$1.execute(RetryableTask.java:73) ~[bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.util.errorrecovery.ExponentialBackOff.execute(ExponentialBackOff.java:48) ~[bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.workflowmanager.tasks.RetryableTask.changeState(RetryableTask.java:69) [bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.workflowmanager.tasks.TaskImpl.validate(TaskImpl.java:76) [bee.jar:1.0-SNAPSHOT]
	at ch.systemsx.bee.workflowmanager.queues.SubmissionQueueEntry.run(SubmissionQueueEntry.java:44) [bee.jar:1.0-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_05]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_05]
	at java.lang.Thread.run(Thread.java:722) [na:1.7.0_05]

As with CacheStrategy.ON_CALL the file objects wrapped into a decorator
the following line in SFTPFileObject causes the problem (SftpFileObject.java:289):
channel.rename(relPath, ((SftpFileObject) newfile).relPath);




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)