Unix Technical Forum

Re: JDBC Little Endian / Big endian problem with DB2 & WebSphere

This is a discussion on Re: JDBC Little Endian / Big endian problem with DB2 & WebSphere within the DB2 forums, part of the Database Server Software category; --> Hi, I have confirmed that the problem is that the int parameters are inverted from little endian to big ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 04:07 AM
ClimberBear
 
Posts: n/a
Default Re: JDBC Little Endian / Big endian problem with DB2 & WebSphere

Hi,

I have confirmed that the problem is that the int parameters are inverted
from little endian to big endian.

I have reproduced the problem with diferent SELECTs, always failing with int
fields.

Please, I'm totally desesperated. Do any of you have any suggestion (even
nonsenses). It will be welcome


"ClimberBear" <yomismo_QUITE_ESTO_SPAMERO@jmalbarran.com> wrote in message
news:...
> Hi,
>
> I've got a very strange problem with a Websphere 5.1 cluster attached to
> DB2
> database in Mainframe z/OS.
>
> I have a J2EE deployed application running normally fine agains the DB2
> host. But, sometimes, the application stop working. In the moment that
> application fails, the only way to get it working again is to restart
> WebSphere server or JDBC pool.
>
> After diagnose the problem we see a normal SELECT like
>
> SELECT MYCOLUM FROM MYTABLE WHERE A=?
>
> where A is an integer column, and we set the variable using JDBC setInt
> method.
> The code is fixed, like
>
> mystatement.setInt(1,1); // The column ALWAYS is set to 1
>
> The SELECT works fine regullarly, and we see the DB2 Host Trace
> SELECT MYCOLUMN FROM MYTABLE WHERE A=?
> PARAMETER MARKER 1 = 1
>
> but when it begins failing, we see
> SELECT MYCOLUMN FROM MYTABLE WHERE A=?
> PARAMETER MARKER 1 = 16777216
>
> The second number is 1, but with the bytes inverted. I suspect that, in a
> determinated moment, the variable suffers a Big Endian -> Little Endian
> conversion incorrectly.
>
> Could you help me?
>
> IBM Spain is working in the problem, but any suggestion, comment or
> workaround will we welcome.
>
> Jose Manuel
>
>
>
>
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 04:15 AM
Doni Ocena
 
Posts: n/a
Default Re: JDBC Little Endian / Big endian problem with DB2 & WebSphere

Perhaps the bug is localized to prepared statements. Try wrapping your
select in a stored procedure.

Good luck,
Doni

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:27 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com