Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 26582 invoked from network); 18 Oct 2007 23:26:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 23:26:28 -0000 Received: (qmail 80457 invoked by uid 500); 18 Oct 2007 23:26:09 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 80444 invoked by uid 500); 18 Oct 2007 23:26:09 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 80433 invoked by uid 99); 18 Oct 2007 23:26:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 16:26:09 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of derejea@gmail.com designates 209.85.146.181 as permitted sender) Received: from [209.85.146.181] (HELO wa-out-1112.google.com) (209.85.146.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 23:26:11 +0000 Received: by wa-out-1112.google.com with SMTP id j5so464163wah for ; Thu, 18 Oct 2007 16:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=ZICYZCFbW+MBTe1nPDxWHeAwIYbb1X2u1fUUDqRdgNQ=; b=A7nywDvtugSUZ4sAsgWRH5i2/VPAbjVxPUfeUqSFms2Bdg5a6OndJDLzEgx4164D/7A70W+HP3BveQiM2C/LFIbMh4bvutft/kFQXmS6+Gznq5cTjasPT6dzkC7Vkfk0QcCIAd+MXYC4mJTK8kMO+IjIL/D8ac+gmOTdStED5UI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AGKidFbHthIL1GJJRyHfanmHdhRM0xzun/i40fLFoj4xA5KLh90mJ0ASi2H5it5lSL04rJf8BT39Ks9mJmwY+DzHfA+TRiMeWrZksRq9zr7fhOvoj3JIRoHthJxIrp3qvIB2IqGdN4cbbIZwc4hNaAsY4lBxx24hQBYRE1DyVWc= Received: by 10.115.74.1 with SMTP id b1mr1268096wal.1192749949499; Thu, 18 Oct 2007 16:25:49 -0700 (PDT) Received: by 10.114.174.19 with HTTP; Thu, 18 Oct 2007 16:25:49 -0700 (PDT) Message-ID: <905277030710181625q3aaa4f40yecce217a40f5ef99@mail.gmail.com> Date: Thu, 18 Oct 2007 19:25:49 -0400 From: "dereje abay" To: user-java@ibatis.apache.org Subject: Re: passing a list to sqlmap In-Reply-To: <13280522.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4125_26531718.1192749949481" References: <13280522.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4125_26531718.1192749949481 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Ramy, See the two options below Option1 : remove property attribute from the iterator tag > resultMap="RschResult" > > select > > $[]$ > > > > from RSCH > > > > > It throws me an error > > --- Check the selectAssgnResults. > --- Check the parameter map. > --- Cause: com.ibatis.common.beans.ProbeException: Error getting ordinal > list from JavaBean. Cause java.lang.StringIndexOutOfBoundsException: > String > index out of range: -1 > > -- > View this message in context: > http://www.nabble.com/passing-a-list-to-sqlmap-tf4648784.html#a13280522 > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > ------=_Part_4125_26531718.1192749949481 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi Ramy,
See the two options below
 
 Option1 : remove property attribute from the iterator tag   
<select id="selectAssgnResults"  parameterClass="java.util.List"

   resultMap="RschResult" >
   select
   <iterate   open=" " close=" " conjunction=",">
     $[]$

    </iterate>

      from RSCH


Option 2.  Pass  an object that contains "reportData"  as  its member variable. Make sure you pass same data type.
Dereje
On 10/18/07, ramy <ramanayerramsetty@gmail.com> wrote:

I have a list over which the select statement has to be run
my sql is like

<select id="selectAssgnResults"  parameterClass=" java.util.List"

   resultMap="RschResult" >
   select
   <iterate  property="reportData" open=" " close=" " conjunction=",">
     $[]$

    </iterate>

      from RSCH

</select>


It throws me an error

--- Check the selectAssgnResults.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException : Error getting ordinal
list from JavaBean. Cause java.lang.StringIndexOutOfBoundsException: String
index out of range: -1

--
View this message in context: http://www.nabble.com/passing-a-list-to-sqlmap-tf4648784.html#a13280522
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


------=_Part_4125_26531718.1192749949481--