What is wrong with my code? I have tried two ways to get this to fail with errors. I am expecting camel to have a problem connecting to the bogus ftp site and not finding the file in question.
====== Using CamelContext and main method ======= import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; public class FtpCamelContext extends RouteBuilder { @Override public void configure() throws Exception { from("file://NoSuchFile.txt"). to("ftp://ftp.NoSuchDomain.com"); } public static void main (String[] args) throws Exception { CamelContext camelContext = new DefaultCamelContext(); camelContext.addRoutes(new FtpCamelContext()); camelContext.start(); } } ========= Using Camel Main =============== import org.apache.camel.builder.RouteBuilder; import org.apache.camel.main.Main; public class FtpCamelMain extends RouteBuilder { private FtpCamelMain() { } @Override public void configure() throws Exception { from("file://NoSuchFile.txt"). to("ftp://ftp.NoSuchDomain.com"); } public static void main(String[] args) throws Exception { Main main = new Main(); main.addRouteBuilder(new FtpCamelMain()); main.enableHangupSupport(); main.start(); main.run(); } Console output from Camel: [simulators.FtpCamelMain.main()] MainSupport INFO Apache Camel 2.13.2 starting [simulators.FtpCamelMain.main()] DefaultCamelContext INFO Apache Camel 2.13.2 (CamelContext: camel-1) is starting [simulators.FtpCamelMain.main()] ManagedManagementStrategy INFO JMX is enabled [simulators.FtpCamelMain.main()] DefaultTypeConverter INFO Loaded 178 type converters [simulators.FtpCamelMain.main()] DefaultCamelContext INFO AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance. [simulators.FtpCamelMain.main()] DefaultCamelContext INFO StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html [simulators.FtpCamelMain.main()] FtpEndpoint DEBUG Created FTPClient [connectTimeout: 10000, soTimeout: 0, dataTimeout: 30000]: org.apache.commons.net.ftp.FTPClient@292f062b [simulators.FtpCamelMain.main()] RemoteFileProducer DEBUG Starting [simulators.FtpCamelMain.main()] RemoteFileProducer TRACE Starting producer: RemoteFileProducer[ftp://ftp.NoSuchDomain.com] [simulators.FtpCamelMain.main()] DefaultCamelContext INFO Route: route1 started and consuming from: Endpoint[file://NoSuchFile.txt] [simulators.FtpCamelMain.main()] DefaultCamelContext INFO Total 1 routes, of which 1 is started. [simulators.FtpCamelMain.main()] DefaultCamelContext INFO Apache Camel 2.13.2 (CamelContext: camel-1) started in 0.843 seconds -- View this message in context: http://camel.465427.n5.nabble.com/Why-doesn-t-camel-throw-an-error-for-invalid-file-or-invalid-ftp-tp5759957.html Sent from the Camel - Users mailing list archive at Nabble.com.