Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
Description
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 are wrapped into a decorator
the following line in SFTPFileObject causes the problem (SftpFileObject.java:289):
channel.rename(relPath, ((SftpFileObject) newfile).relPath);