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

Can't supply beanRowMapper option to JDBC URI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.13.2
    • None
    • camel-jdbc
    • None
    • Unknown

    Description

      Update: beanRowMapper works when passed a Spring reference to a mapper class, but does not accept a class name as the outputType option does.


      When trying to override the DefaultBeanRowMapper with a custom mapper on a jdbc using the beanRowMapper option in the URI, such as:

      jdbc:MyDS?useHeadersAsParameters=true&outputType=SelectOne&outputClass=com.foo.Bar&beanRowMapper=com.my.CorrectedBeanRowMapper

      The following error is thrown, complaining that it doesn't know how to turn a string into an instance of BeanRowMapper:

      Caused By: java.lang.IllegalArgumentException: Could not find a suitable setter for property: beanRowMapper as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.component.jdbc.BeanRowMapper with value com.my.CorrectedBeanRowMapper

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            nathanwray Nathan Wray
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: