Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-21215

camel-jbang: unreliable export to Quarkus without lazy binding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.8.0
    • 4.9.0
    • camel-jbang
    • 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

        1. model.java
          2 kB
          Otavio Rodolfo Piske
        2. model2.java
          2 kB
          Claus Ibsen
        3. route-main.yaml
          0.3 kB
          Otavio Rodolfo Piske

        Issue Links

          Activity

            People

              Unassigned Unassigned
              orpiske Otavio Rodolfo Piske
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: