Java 文件操作失败:更改目录失败。无法将目录更改为:OUT。代码:550

Java 文件操作失败:更改目录失败。无法将目录更改为:OUT。代码:550,java,ftp,apache-camel,apache-servicemix,Java,Ftp,Apache Camel,Apache Servicemix,下面是apache驼峰路线,我正在apache Service Mix 4.5.3中部署 <route> <from uri="activemq:queue:EDI.CONTAINER.OUTBOUND.MESSAGES" /> <to uri="ftp://user@127.0.0.1:21/sin/file/in/?password=password"/> <bean ref="processService" method="

下面是apache驼峰路线,我正在apache Service Mix 4.5.3中部署

<route>
    <from uri="activemq:queue:EDI.CONTAINER.OUTBOUND.MESSAGES" />
    <to uri="ftp://user@127.0.0.1:21/sin/file/in/?password=password"/>
    <bean ref="processService" method="doProcess" />
</route>

我认为您的to uri可能有问题,因为您正在使用/后跟

试着用其中一个

ftp://user@127.0.0.1:21/sin/file/in?password=password

如果这没有帮助,也可以逐步尝试:

ftp://user@127.0.0.1:21/sin/file/in/password=password&stepwise=true

@克劳西布森我很早就试过了。即使使用反斜杠而不是正斜杠。我认为问题在于使用路径分隔符。这就是为什么它将“sin/file/in”创建为单个文件,并尝试将其cd到sin文件夹。但它不在那里。这就导致了这个问题。您使用哪一个驼峰版本?提供了2.10.4作为范围依赖项。因此,它采用ServiceMix 4.5.3默认驼峰版本2.10.7(忘了提及)。@Peter 2.10.4作为范围的依赖项。因此,它需要ServiceMix 4.5.3默认的camel版本2.10.7(忘记提及)。也许您可以尝试升级到camel v2.12.3。旧版本存在多个FTP问题,请参阅或
ftp://user@127.0.0.1:21/sin/file/in/password=password
ftp://user@127.0.0.1:21/sin/file/in/password=password&stepwise=true