Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 56399 invoked from network); 8 Feb 2007 16:28:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 16:28:12 -0000 Received: (qmail 53173 invoked by uid 500); 8 Feb 2007 16:28:13 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 52999 invoked by uid 500); 8 Feb 2007 16:28:12 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 52988 invoked by uid 99); 8 Feb 2007 16:28:12 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 08:28:12 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [202.144.125.181] (HELO smtp.xius.org) (202.144.125.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 08:28:01 -0800 Received: from karthik ([192.168.150.185]) by smtp.xius.org (8.12.10/8.12.10) with SMTP id l18GJV46003270 for ; Thu, 8 Feb 2007 21:49:31 +0530 From: "karthik" To: "Jakarta Commons Users List" Subject: JNDI + dbcp + commons-dbcp-1.2.1.jar Date: Thu, 8 Feb 2007 21:56:40 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 In-Reply-To: <25aac9fc0702071015n22cc23fco21757f9b2dd88987@mail.gmail.com> Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org Hi Currently ,When i wanted to port my application "xyz.war" from OC4j (oracle) to TOMCAT5.5 I found some problems regarding JNDI usage in tomcat with Commons DBCP I have made use of Resource tag as follows I still get the cast exception as below for Array Discriptor being used java.lang.ClassCastException at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:108) at com.xius.infinet.ums.UMSBusinessClass.makeNewRolesAdmin(UMSBusinessClass.jav a:423) The Code being used is as follows 1>> con = (DBConnectionManager.getInstance()).getConnection(); 2>> htReturnData = new Hashtable(); 3>> adTemp = ArrayDescriptor.createDescriptor("ARR_VARCHAR", con); 4>> ar = new ARRAY(adTemp, con, saPrivileges); 5>> OracleCallableStatement cstmt = null; 6>> InfinetUtility.log("UMSBusinessClass.makeNewRolesAdmin " + "{CALL UMS_ADMIN.ROLEPROFILE_INSERT(?,?,?,to_number(?),?)}"); 7>> cstmt = (OracleCallableStatement) con.prepareCall("{CALL UMS_ADMIN.ROLEPROFILE_INSERT(?,?,?,to_number(?),?)}"); 6>> cstmt.setString(1, sRoleName); 9>> cstmt.setString(2, sRoleDesc); 10>> cstmt.setARRAY(3, ar); 11> cstmt.setString(4, new String("" + iNwId)); 12>> cstmt.registerOutParameter(5, java.sql.Types.INTEGER); 14> cstmt.execute(); The exact nature of problem lies in line number "7" where ever the casting happens plz Can somebody explain me why am i getting this error as a result of using "commons-dbcp-1.2.1.jar" with regards Karthik --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org