Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache camel 使用camel的sftp_Apache Camel - Fatal编程技术网

Apache camel 使用camel的sftp

Apache camel 使用camel的sftp,apache-camel,Apache Camel,我正在尝试使用camel使用sftp,并获得jsch-esception。 我为SFTP创建的路线- <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <package>myGroupId</package> <route> <from uri="file:src/srcData?noop=true"/> &

我正在尝试使用camel使用sftp,并获得jsch-esception。 我为SFTP创建的路线-

<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
    <package>myGroupId</package>
    <route>
      <from uri="file:src/srcData?noop=true"/>
      <choice>
        <when>
          <xpath>/person/city = 'London'</xpath>
          <to uri="file:src/targetData/UK"/>
        </when>
        <when>
          <xpath>/person/city = 'Chicago'</xpath>
          <to uri="file:src/targetData/US"/>
        </when>
        <when>
          <xpath>/person/city = 'Tokyo'</xpath>
          <to uri="sftp://XXXserverXXX:22/dir1/subdir?username=testUser?password=testPwd&amp;binary=true"/>
        </when>
        <otherwise>
          <to uri="file:src/targetData/OT"/>
        </otherwise>
      </choice>
    </route>
  </camelContext>

myGroupId
/个人/城市=‘伦敦’
/个人/城市=‘芝加哥’
/个人/城市=‘东京’
但在这种配置下,我面临以下例外情况-
com.jcraft.jsch.JSchException:拒绝主机密钥:

您可能应该定义一个主机文件: “knownHostsFile”选项应该指向一个ssh known hosts文件,其中包含您要连接的主机的公钥


这里有文档记录:

您可能应该定义一个主机文件: “knownHostsFile”选项应该指向一个ssh known hosts文件,其中包含您要连接的主机的公钥

事实上,这里有记录: