You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Wu, Daniel" <Da...@smss.sony.com> on 2010/01/27 01:32:58 UTC

Strange data/number clobbered problem

Hi,

 

We recently encountered some issues which potentially related to iBitis.

We searched the web and the mailing list archive but did not find
anything useful so far.  I am submitting this to the mailing list to see
if anyone has encountered this problem before and/or maybe point me some
direction.

 

We are using iBatis 2.1.7.597 or our production environment.  It is a
java web application deployed to a farm of tomcat 5.5.27.  On one
instance of the tomcat farm, the decimal point of numerical value was
clobbered; the rest of the instances in the farm seems to be ok.  To
troubleshoot, we isolated the instance and hot deployed new modified web

app in the same tomcat container.      The modified app is compiled from

same branch of source code but we added some logging and a jsp page to
allow us to run ad-hoc sql query.  

 

The modified app still shows the wrong numerical value, but the value is
correct when we did direct sql execution through the jsp page.  We
turned on the logging java.sql.* and saw the logging output that we
believe is coming from iBatis:

 

2010-01-26 19:59:11,889 [TP-Processor6] DEBUG java.sql.ResultSet -
{rset-100101} Result: [30453, New Releases $9.99 , 9.99 price for new
releases, N, 0, 0.0, 2009-04-03 02:00:00.0, 2012-04-03 19:00:42.0,

2009-04-03 19:00:53.0, 2010-01-18 21:18:12.0, SSD]

 

Where the 0.0 supposed to be 9.9.  The pattern of the issue is that the
decimal point is shifted in the value, for example 15.95 becomes 159.5.

 

We are currently stuck because we don't want to bounce the instance and
we are not exactly sure how to trigger issue.  We can only suspect that
there are some funny thing going on between iBatis and jdbc.  

 

Again, please let me know if you have seen this issue.  Thank you in
advance.

 

Daniel Wu

 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Strange data/number clobbered problem

Posted by Jeff Butler <je...@gmail.com>.
That's a really old version of iBATIS.  Look in the V2 developer's
guide for the "numericScale" attribute of a parameter map (either
inline or declared).  You'll need to upgrade to a newer version of
iBATIS to use it.  This will likely fix the problem.  Older versions
of iBATIS did not handle this properly.

Jeff Butler

On Tue, Jan 26, 2010 at 6:32 PM, Wu, Daniel <Da...@smss.sony.com> wrote:
> Hi,
>
>
>
> We recently encountered some issues which potentially related to iBitis.
>
> We searched the web and the mailing list archive but did not find
> anything useful so far.  I am submitting this to the mailing list to see
> if anyone has encountered this problem before and/or maybe point me some
> direction.
>
>
>
> We are using iBatis 2.1.7.597 or our production environment.  It is a
> java web application deployed to a farm of tomcat 5.5.27.  On one
> instance of the tomcat farm, the decimal point of numerical value was
> clobbered; the rest of the instances in the farm seems to be ok.  To
> troubleshoot, we isolated the instance and hot deployed new modified web
>
> app in the same tomcat container.      The modified app is compiled from
>
> same branch of source code but we added some logging and a jsp page to
> allow us to run ad-hoc sql query.
>
>
>
> The modified app still shows the wrong numerical value, but the value is
> correct when we did direct sql execution through the jsp page.  We
> turned on the logging java.sql.* and saw the logging output that we
> believe is coming from iBatis:
>
>
>
> 2010-01-26 19:59:11,889 [TP-Processor6] DEBUG java.sql.ResultSet -
> {rset-100101} Result: [30453, New Releases $9.99 , 9.99 price for new
> releases, N, 0, 0.0, 2009-04-03 02:00:00.0, 2012-04-03 19:00:42.0,
>
> 2009-04-03 19:00:53.0, 2010-01-18 21:18:12.0, SSD]
>
>
>
> Where the 0.0 supposed to be 9.9.  The pattern of the issue is that the
> decimal point is shifted in the value, for example 15.95 becomes 159.5.
>
>
>
> We are currently stuck because we don't want to bounce the instance and
> we are not exactly sure how to trigger issue.  We can only suspect that
> there are some funny thing going on between iBatis and jdbc.
>
>
>
> Again, please let me know if you have seen this issue.  Thank you in
> advance.
>
>
>
> Daniel Wu
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org