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

endpoint-dsl - Bean name evaluated as string in sql component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.6.0
    • camel-endpointdsl
    • None
    • Unknown

    Description

      Hi,

      I have this stack:

      • camel spring boot starter
      • camel-sql component
      • camel endpoint DSL

      I have this code:

      .to(sql("classpath:sql/zentiva.sql").dataSource("zentivaDataSource"))
      

      If I use instance of DataSource object and set it in .datasource(dataSourceBean()) there is actually a problem that camel is looking in springbootcamelcontext for the name of the result of dataSourceBean.toString() which might be like HikariDataSource (null). Lookup for wrong bean name happens in

      org.apache.camel.support.CamelContextHelper#mandatoryLookupAndConvert
      

      Route with bean instance is not working properly. As a workaround, we have to use name of the bean.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              drezir Adam Ostrožlík
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: