hop icon indicating copy to clipboard operation
hop copied to clipboard

[Bug]: Move files - issues on working on sFTP files

Open dave-csc opened this issue 8 months ago • 1 comments

Apache Hop version?

2.8.0

Java version?

openjdk 21.0.2 2024-01-16

Operating system

Linux

What happened?

I'm experiencing a strange issue with the Move Files action, when trying to rename a file on a remote sFTP host.

First, it seems that variables are no longer replaced as described in a previous issue (#3778), even if since then I haven't upgraded either Hop or Java.

Second, the transform always fails with the following error:

2024/05/27 11:54:53 - file-cleanup - ERROR: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.processFileFolder(ActionMoveFiles.java:726)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.execute(ActionMoveFiles.java:456)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:655)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:439)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.startExecution(Workflow.java:300)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:249)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.executeWorkflow(WorkflowExecutor.java:227)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.processRow(WorkflowExecutor.java:178)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55)
2024/05/27 11:54:53 - file-cleanup - 	at java.base/java.lang.Thread.run(Thread.java:1583)
2024/05/27 11:54:53 - file-cleanup - ERROR: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:439)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.startExecution(Workflow.java:300)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:249)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.executeWorkflow(WorkflowExecutor.java:227)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.processRow(WorkflowExecutor.java:178)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55)
2024/05/27 11:54:53 - file-cleanup - 	at java.base/java.lang.Thread.run(Thread.java:1583)
2024/05/27 11:54:53 - file-cleanup - Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.processFileFolder(ActionMoveFiles.java:726)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.execute(ActionMoveFiles.java:456)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:655)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 9 more
2024/05/27 11:54:53 - file-cleanup - ERROR: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [make-sftp-paths.hpl]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:439)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.startExecution(Workflow.java:300)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:249)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.executeWorkflow(WorkflowExecutor.java:227)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.processRow(WorkflowExecutor.java:178)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55)
2024/05/27 11:54:53 - file-cleanup - 	at java.base/java.lang.Thread.run(Thread.java:1583)
2024/05/27 11:54:53 - file-cleanup - Caused by: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 8 more
2024/05/27 11:54:53 - file-cleanup - Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.processFileFolder(ActionMoveFiles.java:726)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.execute(ActionMoveFiles.java:456)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:655)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 9 more
2024/05/27 11:54:53 - file-cleanup - ERROR: A serious error occurred during workflow execution: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Write to log]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [make-sftp-paths.hpl]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - ERROR: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Write to log]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [make-sftp-paths.hpl]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:439)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.startExecution(Workflow.java:300)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:249)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.executeWorkflow(WorkflowExecutor.java:227)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transforms.workflowexecutor.WorkflowExecutor.processRow(WorkflowExecutor.java:178)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55)
2024/05/27 11:54:53 - file-cleanup - 	at java.base/java.lang.Thread.run(Thread.java:1583)
2024/05/27 11:54:53 - file-cleanup - Caused by: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [make-sftp-paths.hpl]
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 7 more
2024/05/27 11:54:53 - file-cleanup - Caused by: org.apache.hop.core.exception.HopException: 
2024/05/27 11:54:53 - file-cleanup - Unexpected error occurred while launching entry [Marca per cancellazione sFTP]
2024/05/27 11:54:53 - file-cleanup - Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:802)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 8 more
2024/05/27 11:54:53 - file-cleanup - Caused by: java.lang.NullPointerException: Cannot invoke "Object.toString()" because "destinationfilefolder" is null
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.processFileFolder(ActionMoveFiles.java:726)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.actions.movefiles.ActionMoveFiles.execute(ActionMoveFiles.java:456)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:655)
2024/05/27 11:54:53 - file-cleanup - 	at org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:798)
2024/05/27 11:54:53 - file-cleanup - 	... 9 more
2024/05/27 11:54:53 - file-cleanup.hwf.0 - Workflow duration : 1.052 seconds [  1.052" ]
2024/05/27 11:54:53 - file-cleanup - Workflow duration : 1.052 seconds [  1.052" ]
2024/05/27 11:54:53 - file-cleanup.hwf.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=0)

The detailed log shows that the file paths are correctly passed to the action, whether I type them directly in the transform via Hop GUI or I generate the paths with a previous transform (and check the flag "Copy previous result to args").

I can exclude connectivity issues since I can access the sFTP server from the same machine (through authentication with user and password).

Issue Priority

Priority: 2

Issue Component

Component: Actions

dave-csc avatar May 27 '24 10:05 dave-csc