Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 45411 invoked from network); 5 Mar 2009 05:41:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2009 05:41:41 -0000 Received: (qmail 24774 invoked by uid 500); 5 Mar 2009 05:41:40 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 24109 invoked by uid 500); 5 Mar 2009 05:41: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 24099 invoked by uid 99); 5 Mar 2009 05:41:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 21:41:39 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 05:41:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Lf6KU-00059k-Sj for user-java@ibatis.apache.org; Wed, 04 Mar 2009 21:41:10 -0800 Message-ID: <22345415.post@talk.nabble.com> Date: Wed, 4 Mar 2009 21:41:10 -0800 (PST) From: doopatinagaraju To: user-java@ibatis.apache.org Subject: Passing Array or List to oracle procedure using i battis MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: doopatinagaraju@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org this is nagarju, from 4 days on wards iam trying to sort out the problem which i got , that is sending an array to stored procedure using i battis, please help me, following is my code. public List getGrid() { List listCus = new ArrayList(); try { Connection conn = sqlMap.getDataSource().getConnection(); OracleConnection oconn = (OracleConnection)conn.getMetaData().getConnection (); java.sql.Array sqlArray = null; int intArray[] = { 1,2,3,4,5,6 }; ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("NUM_ARRAY", oconn ); ARRAY array = new ARRAY(descriptor,oconn,intArray); sqlArray = new oracle.sql.ARRAY(descriptor,oconn,intArray); HashMap map = new HashMap(); map.put("organization","%gln%"); map.put("integertArray",array); //map.put("integertArray",sqlArray); Customer cust =new Customer(); sqlMap.queryForObject("langSqlMap.getGridProc",map ); listCus=(List)map.get("custRecords"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); System.out.println("error----------"+e); } return listCus; } {call getGrid_proc(?,?,?)} procedure----------------- create or replace procedure getGrid_proc(p_organization in varchar2, v_List in NUM_ARRAY, p_resultSet out sys_refcursor) is NumArray is type table Number in schemalevel iam getting exception while debugging com.ibatis.common.jdbc.exception.NestedSQLExceptio n: --- The error occurred in /SQLCONFIG/languagesqlmap.xml. --- The error occurred while applying a parameter map. --- Check the langSqlMap.getGridCustomer. --- Check the parameter mapping for the 'integertListObj' property. --- Cause: java.lang.NullPointerException -- View this message in context: http://www.nabble.com/Passing-Array-or-List-to-oracle-procedure-using-i-battis-tp22345415p22345415.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.