ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <d...@excite.com>
Subject Re: bug with running sybase stored procedures
Date Thu, 09 Jun 2005 00:31:35 GMT

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

<br>Not that I know of... crappy programming on database provider side<br>which
they're very reluctant to change because of fear of breaking<br>code specific to their
database.<br><br>One possible solution would be to refactor parts of iBatis so
that you<br>have a class structure per type of database, but this will make<br>keeping
the whole lot in sync harder.<br><br>Dhruv, are you using a (iBatis) TypeHandler?<br><br>Regards,<br>Sven
Boden<br><br>On Mon, 6 Jun 2005 10:21:49 -0600, you wrote:<br><br>>We
made that change to accomodate Oracle drivers that use ref cursors.<br>>I am so sick
of crappy lame companies who don't know how to write<br>>freakin code!!! Is this
something that can be a configuration change<br>>on the transactionManager level?
Thoughts anyone?<br>><br>>Brandon<br>><br>>On 6/6/05,
ds5j@excite.com <ds5j@excite.com> wrote:<br>>> <br>>> using
sybase with IBatis to call a store procedure results in an error.(null pointer exception)<br>>>
<br>>> <br>>> <br>>> At 
first I thought Ibatis could not handle stored procedure without output params but this was
not the case.<br>>> <br>>> <br>>> <br>>> The
issue seems to be with Sybase's jdbc code.<br>>> <br>>> <br>>>
<br>>> To fix the issue I changed the following 2 lines in executeQueryProcedure
in SqlExecutor.java:<br>>> <br>>>  //     cs.execute();<br>>>
<br>>>  //     rs = cs.getResultSet();  //this was throwing the exception the
boolean from execute () returns true correctly<br>>> <br>>> <br>>>
<br>>>          rs = cs.executeQuery();<br>>> <br>>> 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.)<br>>> <br>>>
<br>>> <br>>> This issue only seems particular to callable statements
as the naked query outside the stp worked with Ibatis.<br>>> <br>>>
<br>>> <br>>> Could Ibatis be 
changed via the proposed fix without other repercussions?<br>>> <br>>>
<br>>> <br>>> please advise if this change is acceptable.  This issue
also addresses the post on "RE: Problem with stored procedure and resultMap or resultClass?"<br>>>
<br>>> <br>>> <br>>> thanks<br>>> <br>>>
<br>>> <br>>> Dhruv<br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
<br>>> <br>>> <br>>> <br>>> <br>>>
_______________________________________________<br>>> Join Excite! - http://www.excite.com<br>>>
The most personalized portal on the Web!<br>>> <br>>> <br>>><br><br>

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



Mime
View raw message