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

camel-sql - Dynamic producer (toD) problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 3.1.0
    • camel-sql
    • None
    • Unknown

    Description

      Spring Boot: 2.2.1

      Camel: 3.0.0

      Works using "to()"

       

      from("file://d:/tmp/?fileName=test&noop=true")
      .setHeader("val1", constant(1))
      .setHeader("val2", constant("yo"))
      .to("sql:insert into gbtemp (col1, col2) values (:#val1, :#val2)?dataSource=#dataSource");
      

      Does not work using ".toD()"

      from("file://d:/tmp/?fileName=test&noop=true")
      .setHeader("val1", constant(1))
      .setHeader("val2", constant("yo"))
      .setHeader("insertSql", constant("insert into gbtemp (col1, col2) values (:#val1, :#val2)"))
      .toD("sql:${header.insertSql}?dataSource=#dataSource");
      

      This used to work fine under Camel 2.x

      Example error lines:

      Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: sql
      
      Caused by: org.apache.camel.PropertyBindingException: Error binding properties on bean: org.apache.camel.component.sql.SqlComponent@a72b3b2
      
      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: sql://insert...
      

       

      Attachments

        1. log.txt
          40 kB
          Gurpal2000
        2. CAMEL-14299.log
          140 kB
          Jan Bednar

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Gurpal2000 Gurpal2000
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: