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

camel-sql - Dynamic producer (toD) problem

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: camel-sql
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: