Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 15179 invoked from network); 9 Jun 2005 00:31:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 00:31:46 -0000 Received: (qmail 60437 invoked by uid 500); 9 Jun 2005 00:31:45 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 60415 invoked by uid 500); 9 Jun 2005 00:31:44 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 60375 invoked by uid 99); 9 Jun 2005 00:31:44 -0000 X-ASF-Spam-Status: No, hits=1.6 required=10.0 tests=DNS_FROM_RFC_POST,FORGED_RCVD_HELO,NO_REAL_NAME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of ds5j@excite.com designates 207.159.120.60 as permitted sender) Received: from nn6.excitenetwork.com (HELO excite.com) (207.159.120.60) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 08 Jun 2005 17:31:43 -0700 Received: by xprdmailfe25.nwk.excite.com (Postfix, from userid 110) id E0807BB4A9; Wed, 8 Jun 2005 20:31:35 -0400 (EDT) To: ibatis-user-java@incubator.apache.org Subject: Re: bug with running sybase stored procedures Received: from [198.204.141.208] by xprdmailfe25.nwk.excite.com via HTTP; Wed, 08 Jun 2005 20:31:35 EST X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: ID = e417422707b71843bab99878685ed490 Reply-To: ds5j@excite.com From: "" MIME-Version: 1.0 X-Sender: ds5j@excite.com X-Mailer: PHP Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <20050609003135.E0807BB4A9@xprdmailfe25.nwk.excite.com> Date: Wed, 8 Jun 2005 20:31:35 -0400 (EDT) X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sven, I don't think so. sorry, I don't know what a TypeHandler is. I am calling the sql map to map it to the object. just as a proof of concept. our team is shifting to oracle. so this won't hold us up. Could the fix just be a hack like adding a method called ifSybaseDriverThenWorkAroundSybaseBug(boolean true) if that flag is true executeQuery could be used instead of excute()//getResultSet. Once Sybase fixes the bug-if they ever do-this part of the code could be whacked later. Also I notice that there getMoreResultSets is not called anywhere in the code which leads me to suspect multiple result sets won't work if they are not output parameters in IBatis. is this correct? thanks dhruv --- On Mon 06/06, Sven Boden < liast123@pandora.be > wrote: From: Sven Boden [mailto: liast123@pandora.be] To: ibatis-user-java@incubator.apache.org, brandon.goodin@gmail.com Date: Mon, 06 Jun 2005 18:41:24 +0200 Subject: Re: bug with running sybase stored procedures
Not that I know of... crappy programming on database provider side
which they're very reluctant to change because of fear of breaking
code specific to their database.

One possible solution would be to refactor parts of iBatis so that you
have a class structure per type of database, but this will make
keeping the whole lot in sync harder.

Dhruv, are you using a (iBatis) TypeHandler?

Regards,
Sven Boden

On Mon, 6 Jun 2005 10:21:49 -0600, you wrote:

>We made that change to accomodate Oracle drivers that use ref cursors.
>I am so sick of crappy lame companies who don't know how to write
>freakin code!!! Is this something that can be a configuration change
>on the transactionManager level? Thoughts anyone?
>
>Brandon
>
>On 6/6/05, ds5j@excite.com wrote:
>>
>> using sybase with IBatis to call a store procedure results in an error.(null pointer exception)
>>
>>
>>
>> At first I thought Ibatis could not handle stored procedure without output params but this was not the case.
>>
>>
>>
>> The issue seems to be with Sybase's jdbc code.
>>
>>
>>
>> To fix the issue I changed the following 2 lines in executeQueryProcedure in SqlExecutor.java:
>>
>> // cs.execute();
>>
>> // rs = cs.getResultSet(); //this was throwing the exception the boolean from execute () returns true correctly
>>
>>
>>
>> rs = cs.executeQuery();
>>
>> I was able to reproduce this issue outside of ibatis with different jdbc drivers from sybase(including the latest). I have reported the bug to sybase but have not heard back. (Sybase documentation judiciously only uses executeQuery in its examples and not execute.)
>>
>>
>>
>> This issue only seems particular to callable statements as the naked query outside the stp worked with Ibatis.
>>
>>
>>
>> Could Ibatis be changed via the proposed fix without other repercussions?
>>
>>
>>
>> please advise if this change is acceptable. This issue also addresses the post on "RE: Problem with stored procedure and resultMap or resultClass?"
>>
>>
>>
>> thanks
>>
>>
>>
>> Dhruv
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Join Excite! - http://www.excite.com
>> The most personalized portal on the Web!
>>
>>
>>

_______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web!