Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 60596 invoked from network); 10 Jan 2008 16:17:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jan 2008 16:17:52 -0000 Received: (qmail 16714 invoked by uid 500); 10 Jan 2008 16:17:39 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 16703 invoked by uid 500); 10 Jan 2008 16:17:39 -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 16692 invoked by uid 99); 10 Jan 2008 16:17:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2008 08:17:39 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fatboysuns@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2008 16:17:16 +0000 Received: by ug-out-1314.google.com with SMTP id e2so282538ugf.21 for ; Thu, 10 Jan 2008 08:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=RI3JROR/fr/zztMujpGWAywAAOyh0mDlOMgE562EIlg=; b=MA2XE4jS19fE+S6iXIcXJalPGmtqoVZryCmrtIVBnSPW7GGVAklBzCeSd5mKEi8jpm7iF5V2yvB0vPULhzZ6xbfvzzjZersiCElCaTsbPofZ36+/3hEWjZYdOAP4lPnKPQEemHWzkCRukHgBb5I3yueKLL3Yu3mwn/gel0gAhKU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dbG4DJhxpkdqwXM5ZCQ6awcFeOBzKr3XtjjcLLKALweBcsMv5jnzrNb4ZhX0cFHZqJBt4M1zYLx64wV6XQWWEt0cwWbB21e08PwjprktQaefI3r2nIsxyv0eaen5uJfyiwQAfWws1BVNQ3hVJJcUeMMFG0SxIyJehbuiUp0P4Ww= Received: by 10.66.219.11 with SMTP id r11mr3370434ugg.31.1199981841160; Thu, 10 Jan 2008 08:17:21 -0800 (PST) Received: by 10.67.87.5 with HTTP; Thu, 10 Jan 2008 08:17:21 -0800 (PST) Message-ID: Date: Thu, 10 Jan 2008 09:17:21 -0700 From: "Sundar Sankar" To: user-java@ibatis.apache.org, lmeadors@apache.org Subject: Re: How to handle rowtype in parameter when calling a stored procedure In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6128_20833200.1199981841150" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_6128_20833200.1199981841150 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am new to accessing stored procs as such. I don't know how I would do it JDBC. I had an example with Springs jdbcTemplate where my jdbcType was ARRAY. But no matter what I give the type as(ARRAY, OBJECT, CURSOR) ibatis was throwing me an UncatergorizedSQLException or a NullPointer exception and asked me to check the mapping for the property. I had tried having a resultMap too mapping, an object where each of the columns where mapped to properties. I also made sure in the unit test that none of the properties were Null. Still I am getting this error. My Mapping file is something like this {call theProc(?,?)} I have tried changing the parameterMap to various formats where the jdbcType have been all that I have mentioned and have also tried including the resultMap as as the map below. In my unit test, I set in values to all the properties explicitly, leaving nothing null. Regards Sundar Sankarnarayanan On Jan 10, 2008 9:04 AM, Larry Meadors wrote: > How would you do it with JDBC? > > Larry > > > On Jan 10, 2008 9:00 AM, Sundar Sankar wrote: > > Hi, > > I have a stored procedure that takes rowtype, an instance of a > table, > > in my database. How do you create the mapping for such kind of case. > Does > > Ibatis support this? > > > > Regards > > Sundar Sankarnarayanan > > > ------=_Part_6128_20833200.1199981841150 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline  I am new to accessing stored procs as such. I don't know how I would do it JDBC. I had an example with Springs jdbcTemplate where my jdbcType was ARRAY. But no matter what I give the type as(ARRAY, OBJECT, CURSOR) ibatis was throwing me an UncatergorizedSQLException or a NullPointer exception and asked me to check the mapping for the property. I had tried having a resultMap too mapping,  an object where each of the columns where mapped to properties. I also made sure in the unit test that none of the properties were Null.

Still I am getting this error.


My Mapping file is something like this



<parameterMap id="saveOrUpdateCoursesParam" class="map">
        <parameter  property="p_property" jdbcType="OTHER"  javaType=" com.model.modelClass"
            mode="IN"/>
        <parameter property="p_prop2" jdbcType="NUMBER"
            javaType="java.lang.Long" mode="IN" />
    </parameterMap>

    <procedure id="proc"
        parameterMap="procParam">
        {call
        theProc(?,?)}
    </procedure>

    <resultMap
        class="com.model.modelClass"
        id="transcriptActivity">
        <result
.
.
.
.
.
    </resultMap>

I have tried changing the parameterMap to various formats where the jdbcType have been all that I have mentioned and have also tried including the resultMap as as the map below. In my unit test, I set in values to all the properties explicitly, leaving nothing null.

Regards
Sundar Sankarnarayanan

On Jan 10, 2008 9:04 AM, Larry Meadors <lmeadors@apache.org> wrote:
How would you do it with JDBC?

Larry


On Jan 10, 2008 9:00 AM, Sundar Sankar <fatboysuns@gmail.com > wrote:
> Hi,
>      I have a stored procedure that takes rowtype, an instance of a table,
> in my database. How do you create the mapping for such kind of case. Does
> Ibatis support this?
>
> Regards
> Sundar Sankarnarayanan
>

------=_Part_6128_20833200.1199981841150--