Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 82385 invoked from network); 30 Aug 2010 09:39:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Aug 2010 09:39:07 -0000 Received: (qmail 7602 invoked by uid 500); 30 Aug 2010 09:39:07 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 7460 invoked by uid 500); 30 Aug 2010 09:39:04 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 7451 invoked by uid 500); 30 Aug 2010 09:39:03 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 7445 invoked by uid 99); 30 Aug 2010 09:39:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 09:39:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Aug 2010 09:39:01 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7U9ce79005420 for ; Mon, 30 Aug 2010 09:38:41 GMT Message-ID: <23910673.2941283161120483.JavaMail.jira@thor> Date: Mon, 30 Aug 2010 05:38:40 -0400 (EDT) From: "Ramon van den Hoven (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-3066) Result is empty after calling a stored procedure In-Reply-To: <32164249.11601282315067296.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/CAMEL-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61500#action_61500 ] Ramon van den Hoven commented on CAMEL-3066: -------------------------------------------- Yes sorry, I was on holiday for a week. It's hard to create a unit test for this one, since it connects to an oracle database. I'm questioning if it is a camel issue, maybe it's a ibatis issue; The statement: result = client.queryForObject(statement, in); expects a statement: in my case a stored procedure: {call lsuser.liq_vortex.LIQ_VORTEX_ALL_STRUCT(?,?,?,?,?)} The in parameter is a Map, where I defined the input parameters for the stored procedure The last parameter in the Map is the out parameter. So my results are in the Map indeed and not in the return value of the method. This way no results will be passed on in the camel route. I will try to create a simple project. > Result is empty after calling a stored procedure > ------------------------------------------------ > > Key: CAMEL-3066 > URL: https://issues.apache.org/activemq/browse/CAMEL-3066 > Project: Apache Camel > Issue Type: Bug > Components: camel-ibatis > Affects Versions: 2.4.0 > Environment: Windows, eclipse, oracle > Reporter: Ramon van den Hoven > > 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); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.