Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.8.0
-
None
-
Unknown
Description
Trying to export a java file with beans annotated with @BindToRegistry to a CEQ project, causes it to fail with:
Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: createChatMessage of type: org.apache.camel.Processor
This error is sporadic and doesn't happen 100% of the time (it seems to be more reproducible on shared cloud environments).
To reproduce: save the model.java and the route-main.yaml files and run:
camel export * --runtime=quarkus --gav=org.demo:agent:1.0.0 --dep=io.quarkiverse.langchain4j:quarkus-langchain4j-core:0.17.2,io.quarkiverse.langchain4j:quarkus-langchain4j-openai:0.17.2 --ignore-loading-error
Adding @BindToRegistry(lazy=true) makes the export work reliably, but that generates a project that is non-buildable.
Attachments
Attachments
Issue Links
- is related to
-
CAMEL-21208 camel-jbang: use a template engine for code generation
- Open
-
CAMEL-21138 camel-jbang - Export should use lazy beans
- Resolved
- relates to
-
CAMEL-21218 camel-quarkus - BindToRegistry seems NOT to work outside RouteBuilder
- Resolved