开发者

Apache Camel onException does not get fired

I have this simple route:

onException(Exception.c开发者_StackOverflow社区lass)
  .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");

If I stop the sftp server, from("sftp:...") throws an org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://myuser@localhost I would expect that the onException log prints something, but it does not. Why??

If I enable the sftp server, the route works and the log after from("sftp:...") prints the file content (so, i guess that slf4j is well configured).

What can be the problem?


Answer:

http://camel.465427.n5.nabble.com/Apache-Camel-onException-does-not-get-fired-td4899276.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜