Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 34251 invoked from network); 23 Oct 2007 09:59:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Oct 2007 09:59:20 -0000 Received: (qmail 67679 invoked by uid 500); 23 Oct 2007 09:59:01 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 67669 invoked by uid 500); 23 Oct 2007 09:59:01 -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 67658 invoked by uid 99); 23 Oct 2007 09:59:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2007 02:59:01 -0700 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; Tue, 23 Oct 2007 09:59:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IkGX5-000837-Lk for user-java@ibatis.apache.org; Tue, 23 Oct 2007 02:58:43 -0700 Message-ID: <13360825.post@talk.nabble.com> Date: Tue, 23 Oct 2007 02:58:43 -0700 (PDT) From: IBATIS To: user-java@ibatis.apache.org Subject: Re: Please help - Using IBatis in RAD 7.0 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: venkatesh.madhavan@wipro.com References: <13292529.post@talk.nabble.com> <13308959.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Abhigyan, I forgot to mention about the databas. It is Oracle 10G. Regards Venkat Abhigyan Agrawal1 wrote: > > Hi Venkat, > The first error you are getting is definitely because of wrong > jdbc type. > I tried the code you have given and it gives the same error (register > output parameters failed) until I change it to VARCHAR instead of > VARCHAR2. After doing the change, the code is running through iBATIS > displaying expected results. Which database are you using? > One more thing, you can remove resultClass from procedure as you > are already giving parameterClass of the same map. > As far as the transaction is getting timed out is concerned, are > you providing some timeout values yourself? because I am not and the > procedure is executing without problem. > > Cheers, > Abhigyan Agrawal > > > > > IBATIS > 20/10/2007 16:45 > Please respond to > user-java@ibatis.apache.org > > > To > user-java@ibatis.apache.org > cc > > Subject > Re: Please help - Using IBatis in RAD 7.0 > > > > > > > > Larry, > > Sorry for not being clear with my queries. I have refined my query as > below. > Please help me out. > > I have a stored procedure as below. > > CREATE OR REPLACE procedure mytest > ( > In_Bag_ID in varchar, > In_Station in varchar, > In_Crtn_Dtm in varchar, > Out_Bag_Data out varchar2, > Out_Return_Cde out number) > is > Begin > Out_Bag_Data := 'success'; > Out_Return_Cde := 0; > End mytest; > / > > > My .xml resource file entry is as below > > parameterClass="java.util.HashMap" > resultClass="java.util.HashMap"> > {call mytest > (#bagid,javaType=java.lang.String,jdbcType=VARCHAR,mode=IN#, > #apcde,javaType=java.lang.String,jdbcType=VARCHAR,mode=IN#, > #crtndtm,javaType=java.lang.String,jdbcType=VARCHAR,mode=IN#, > #bagdata,javaType=java.lang.String,jdbcType=VARCHAR2,mode=OUT#, > #returncode,javaType=java.lang.Integer,jdbcType=INTEGER,mode=OUT#)} > > > My Calling java programme is as below. > > hshBagTag.put("bagid",""); > hshBagTag.put("apcde",""); > hshBagTag.put("crtndtm",""); > hshBagTag.put("bagdata",new String("")); > hshBagTag.put("returncode", new Integer(0)); > > SqlMapperClient.queryForObject("retrieveBagTagInfoSP", > hshBagTag,hshBagTag); > > While I invoke the stored procedure, I am getting the following error > > --- The error occurred in com/nwa/safetrac/domain/common/dao/sql/Bags.xml. > > --- The error occurred while executing query procedure. > --- Check the {call mytest (?, ?, ?, ?, ?)}. > --- Check the output parameters (register output parameters failed). > --- Cause: java.sql.SQLException: Invalid column type > > > In the same above I changed the > > #bagdata,javaType=java.lang.String,jdbcType=VARCHAR2,mode=OUT#, > to > #bagdata,javaType=java.lang.String,jdbcType=VARCHAR,mode=OUT#, > > and > #returncode,javaType=java.lang.Integer,jdbcType=INTEGER,mode=OUT# > to > #returncode,javaType=java.lang.Double,jdbcType=DECIMAL,mode=OUT#) > > Now, the above error was not occurring but the transaction is getting > timed > out. > > Could you please tell me where I am going wrong, I am badly in need of a > help. > > My Environment is as below. > > Development Environment - RAD 7.0 (Websphere Application server 6.0) > Ibatis jar files - ibatis-common-2.jar / ibatis-sqlmap-2.jar (i got it > from > jpetstore example package) > > Regards > Venkat > > > Larry Meadors-2 wrote: >> >> I know both work, but without seeing any code...it's impossible for us >> to see what your specific issue is. >> >> Larry >> >> >> On 10/19/07, IBATIS wrote: >>> >>> Hi There, >>> >>> I am facing issues while I invoke a sql / stored procedure in RAD 7.0 >>> using >>> Ibatis. >>> >>> Do I need add any .jars or others to make it work with RAD. >>> >>> Please look into the issues as below. >>> >>> 1. while I invoke a plain sql I am not getting the result. >>> 2. While I invoke a stored procedure, the transaction is getting timed >>> out. >>> >>> when i invoke the above using ordinary java.sql.connection ( I get this >>> connection object from SqlMapClient.getDataSource().getConnection()) it >>> is >>> working fine for both points 1&2. >>> >>> Your help will be highly appreciated. >>> >>> Regards >>> Venkat >>> -- >>> View this message in context: >>> > http://www.nabble.com/Please-help---Using-IBatis-in-RAD-7.0-tf4652521.html#a13292529 > >>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/Please-help---Using-IBatis-in-RAD-7.0-tf4652521.html#a13308959 > > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > > -- View this message in context: http://www.nabble.com/Please-help---Using-IBatis-in-RAD-7.0-tf4652521.html#a13360825 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.