java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When trying to do a Rename using SFTP it throws an exception "Exception occurred while trying to change working directory to null." *Steps to reproduce:* * Start the SFTP server in mac and check it is running * Try to rename a file/folder with a flow like this: {code:xml} <flow name="flow-sftp-rename-folder-and-file"> <httpn:listener responseStreamingMode="AUTO" path="/sftp-rename" parseRequest="false" config-ref="http-listener-config"/> <ftp:rename path="output" to="output-renamed" overwrite="false" config-ref="sftp-remote-without-workdir" /> <logger level="INFO" message="Output folder renamed succesfully to output-renamed" doc:name="Logger"/> <ftp:rename path="output-renamed/hello-world.txt" to="hello-world-renamed.txt" overwrite="false" config-ref="sftp-local"/> </flow> {code} {quote} DEBUG 2016-09-03 01:57:45,268 [[65af1b30-7191-11e6-93b2-0a0027000000].flow-sftp-rename-folder-and-file.worker.01] org.mule.extension.ftp.internal.sftp.connection.SftpClient: Attempting to cwd to: null {quote} {quote} ******************************************************************************** Message : Exception occurred while trying to change working directory to null. Payload : null Payload Type : null Element : /flow-sftp-rename-folder-and-file/processors/0 @ 65af1b30-7191-11e6-93b2-0a0027000000 -------------------------------------------------------------------------------- Root Exception stack trace: java.lang.NullPointerException at com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2916) at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:339) at org.mule.extension.ftp.internal.sftp.connection.SftpClient.changeWorkingDirectory(SftpClient.java:100) at org.mule.extension.ftp.internal.sftp.connection.SftpFileSystem.changeToBaseDir(SftpFileSystem.java:98) at org.mule.runtime.module.extension.file.api.StandardFileSystemOperations.rename(StandardFileSystemOperations.java:310) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) {quote}
    via by Alejandro Nosenzo,
    • java.lang.NullPointerException at com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2916) at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:339) at org.mule.extension.ftp.internal.sftp.connection.SftpClient.changeWorkingDirectory(SftpClient.java:100) at org.mule.extension.ftp.internal.sftp.connection.SftpFileSystem.changeToBaseDir(SftpFileSystem.java:98) at org.mule.runtime.module.extension.file.api.StandardFileSystemOperations.rename(StandardFileSystemOperations.java:310) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    No Bugmate found.