I am consuming .msg files from ftp using apache camel. But is giving error while consuming the file because file names have special character.
Below is my URI : sftp://username@machinename:22/folderName?delete=true&privateKeyFile=C%3A%2FprivateKey%2F%2Fcftkey.pem&recursive=true&strictHostKeyChecking=no It is able to consume files without special characters Below is stack trace org.apache.camel.component.file.remote.SftpConsumer - Error processing file RemoteFile[test 002 - char sp ?.msg] due to Cannot retrieve file: 00019/test 002 - char sp?.msg. Caused by: [org.apache.camel.component.file.GenericFileO perationFailedException - Cannot retrieve file: 00019/*[cont_123456]_SendingMsgÇ_BU2.msg]* org.apache.camel.component.file.GenericFileOperationFailedException: Cannot retrieve file: 00019/test 002 - char sp?.msg at org.apache.camel.component.file.remote.SftpOperations.retrieveFileToStreamInBody(SftpOperations.java:651) at org.apache.camel.component.file.remote.SftpOperations.retrieveFile(SftpOperations.java:594) at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:394) at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:99) at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java :98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.jav a:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: 2: at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846) at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2198) at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1294) at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1266) at -- View this message in context: http://camel.465427.n5.nabble.com/Uanble-to-consume-file-with-special-character-tp5766789.html Sent from the Camel - Users mailing list archive at Nabble.com.
