Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11231

Component SQL on Camel returns null body, after an UPDATE statement

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • fuse-7.4-GA
    • Camel, Fuse Distribution
    • None
    • % %
    • -
    • Hide

      No workaround identified

      Show
      No workaround identified
    • Hide

      1. install fresh Fuse 7.4 instance and
      2. install H2 and Commons DBCP bundles

      karaf@root> wrap:mvn:com.h2database/h2/1.4.199
      karaf@root> wrap:mvn:commons-dbcp/commons-dbcp/1.4

      3. unzip reproducer and install, I assume you installed Fuse 7.4 on /tmp

      $ unzip reproducer.zip
      $ cd reproducer
      $ mvn clean package; cp target/camel-blueprint-cbr-1.0.0-SNAPSHOT.jar /tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy/

      4. on FUSE console, check log

      karaf@root> log:tail
      ...
      08:40:18.889 INFO [fileinstall-/tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy] Started bundle: file:/tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy/camel-blueprint-cbr-1.0.0-SNAPSHOT.jar
      08:40:20.503 INFO [Camel (cbr-example-context) thread #1 - timer://foo] Done processing BODY =

      Show
      1. install fresh Fuse 7.4 instance and 2. install H2 and Commons DBCP bundles karaf@root> wrap:mvn:com.h2database/h2/1.4.199 karaf@root> wrap:mvn:commons-dbcp/commons-dbcp/1.4 3. unzip reproducer and install, I assume you installed Fuse 7.4 on /tmp $ unzip reproducer.zip $ cd reproducer $ mvn clean package; cp target/camel-blueprint-cbr-1.0.0-SNAPSHOT.jar /tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy/ 4. on FUSE console, check log karaf@root> log:tail ... 08:40:18.889 INFO [fileinstall-/tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy] Started bundle: file:/tmp/fuse-karaf-7.4.0.fuse-740028-redhat-00001/deploy/camel-blueprint-cbr-1.0.0-SNAPSHOT.jar 08:40:20.503 INFO [Camel (cbr-example-context) thread #1 - timer://foo] Done processing BODY =

    Description

      On a Camel route, using SQL component, an UPDATE statement returns "null" in the body, after executing, on Fuse 7.x

      Update statement is like: UPDATE <table> SET <values> WHERE <condition>

      SQL component documentation says that:

      "For select operations, the result is an instance of List<Map<String, Object>> type, as returned by the JdbcTemplate.queryForList() method. For update operations, the result is the number of updated rows, returned as an Integer."

      Customer says that it worked on Fuse 6, but I did not check this. What I tried was on H2 and SQL Server, with both fuse 7.1 and fuse 7.4, and all returned NULL on body after executing UPDATE statement

      Attachments

        Activity

          People

            acosenti Andrea Cosentino
            rhn-support-anarvaez Alfredo Narvaez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: