Apache camel Apache Camel OneException不会被激发

Apache camel Apache Camel OneException不会被激发,apache-camel,Apache Camel,我有一条简单的路线: onException(Exception.class) .to("log:com.mycompany.test?level=INFO"); from("sftp://myuser@localhost:/files/?password=mypassword&knownHostsFile=/myuser/.ssh/known_hosts&noop=true") .to("log:com.mycompany.test?level=INFO"); 如果

我有一条简单的路线:

onException(Exception.class)
  .to("log:com.mycompany.test?level=INFO");

from("sftp://myuser@localhost:/files/?password=mypassword&knownHostsFile=/myuser/.ssh/known_hosts&noop=true")
  .to("log:com.mycompany.test?level=INFO");
如果停止sftp服务器,从(“sftp:…”)抛出org.apache.camel.component.file.GenericFileOperationFailedException:无法连接到sftp://myuser@本地主机 我希望OneException日志打印一些东西,但它没有。为什么

如果我启用了sftp服务器,那么路由将正常工作,from(“sftp:…”)之后的日志将打印文件内容(因此,我猜slf4j配置得很好)

有什么问题吗?

回答: