The main issue is that Camels main class does not handle its context appropriately. Although its method .getOrCreateCamelContext() returns a context and allows you to add the desired component, the context may not be as unique as one thinks when reading the corresponding description. Furthermore, when it comes to the execution of the code (main.run()), a post-processing method tends to override the created context with an empty one. To still be able to work with Camel and pure Java DSL, you can create a new main class as an extension of Camels main. Within this new class you start introducing your own instance of CamelContext and handle it in an uniquely manner. To do so the methods .getOrCreateCamelContext() and .postProcessContext() have to be overridden as shown within the provided code snippet.