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

Result is empty after calling a stored procedure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.4.0
    • 2.5.0
    • camel-ibatis
    • None
    • Windows, eclipse, oracle

    Description

      When calling a stored procedure in the following form

      {call lsuser.liq_vortex.LIQ_VORTEX_ALL_STRUCT(?,?,?,?,?)}

      where the last ? is an OUT param, the result is null.

      See for comments in the following function in the IbatisProducer class
      Look for the NOTE:

      private void doQueryForObject(Exchange exchange) throws Exception {
      SqlMapClient client = endpoint.getSqlMapClient();

      Object result;
      Object in = exchange.getIn().getBody();
      if (in != null) {
      if (LOG.isTraceEnabled())

      { LOG.trace("QueryForObject: " + in + " using statement: " + statement); }

      result = client.queryForObject(statement, in);
      NOTE: The in parameter has the resultset, in my case a HashMap, isn't it always a Map?
      should be something like:
      result = in.get(outParameterKey)

      } else {
      if (LOG.isTraceEnabled())

      { LOG.trace("QueryForObject using statement: " + statement); }

      result = client.queryForObject(statement);
      }

      doProcessResult(exchange, result);
      }

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            ramonus Ramon van den Hoven
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: