Hi

You need to run it with

camel run *

Or to specify each file ala

camel run file1 file2





On Thu, Feb 16, 2023 at 7:22 AM Mikael Koskinen <mijap...@gmail.com> wrote:

> Hi,
>
> I'm trying but failing to use Java processors/Java classes when
> writing integrations with YAML and running them with Camel JBang.
>
> I started by cloning this example:
> https://github.com/apache/camel-karavan/tree/main/karavan-demo/aggregator
>
> But running with using simple:
>
> camel run aggregator.yaml
>
> Gives an error:
> Failed to create route route1 at: >>> PollEnrich[simple{file:file_src?noo
> p=true}] <<< in route:
> Route(route1)[From[timer:test?delay=1000&period=3000] -> [Se...
> because of Cannot find Aggregatio
> nStrategy in Registry with name: #aggregator
>
> So I checked the documentation and I found this mention:
>
>
> https://camel.apache.org/manual/camel-jbang.html#_using_java_beans_and_processors
> ---
> There is basic support for including regular Java source files
> together with Camel routes, and let Camel JBang runtime compile the
> Java source. This means you can include smaller utility classes,
> POJOs, Camel Processors and whatnot that the application needs.
> ---
>
> I think I could package the java-file into a jar and then use that as
> a dependency but I would like to use java-files if possible. And if
> possible, embedding them inside the YAML sounds interesting.
>
> I think I'm missing something simple as it is still early morning but
> if anyone has any tips to offer, I'm happy for the assistance.
>
> Kind regards,
> Mikael
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to