>From what I remember hook is at line 42. We reported bugs to Oracle bug, ...

  | package oracle.jdbc.driver;
  | 
  | import java.sql.SQLException;
  | 
  | import oracle.core.lmx.CoreException;
  | 
  | // Referenced classes of package oracle.jdbc.driver:
  | //            VarnumBinder, OraclePreparedStatement
  | 
  | class DoubleBinder extends VarnumBinder
  | {
  | 
  |     DoubleBinder()
  |     {
  |         digits = new char[20];
  |     }
  | 
  |     void bind(OraclePreparedStatement stmt, int bindPosition, int 
rankInBuffer, int rank, byte bindBytes[], char bindChars[], short 
bindIndicators[], 
  |             int bytePitch, int charPitch, int byteoffset, int charoffset, 
int lenoffset, int indoffset, boolean clearPriorBindValues)
  |         throws SQLException
  |     {
  |       
  |         byte b[] = bindBytes;
  |         int offset = byteoffset + 1;
  |         double val = stmt.parameterDouble[rank][bindPosition];
  |         int len = 0;
  |         if(val == 0.0D)
  |         {
  |             b[offset] = -128;
  |             len = 1;
  |         } else
  |         if(val == (1.0D / 0.0D))
  |         {
  |             b[offset] = -1;
  |             b[offset + 1] = 101;
  |             len = 2;
  |         } else
  |         if(val == (-1.0D / 0.0D))
  |         {
  |             b[offset] = 0;
  |             len = 1;
  |         } else if (Double.isNaN(val)) {
  |             b[offset] = -1;
  |             b[offset+1] = (byte)0xf8;
  |             len = 2;
  |         } else
  |         {
  |             boolean neg = val < 0.0D;
  |             if(neg)
  |                 val = -val;
  |             long bits = Double.doubleToLongBits(val);
  |             int rawExponent = (int)(bits >> 52 & 2047L);
  |             int guess = (rawExponent <= 1023 ? 127 : 126) - 
(int)((double)(rawExponent - 1023) / 6.6438561897747253D);
  |             if(guess < 0)
  |             {
  |                 SQLException ex = new 
SQLException(CoreException.getMessage((byte)3) + " trying to bind " + val);
  |                 throw ex;
  |             }
  |             if(guess > 192)
  |             {
  |                 SQLException ex = new 
SQLException(CoreException.getMessage((byte)2) + " trying to bind " + val);
  |                 throw ex;
  |             }
  |             if(val > factorTable[guess])
  |                 while(guess > 0 && val > factorTable[--guess]) ;
  |             else
  |                 for(; guess < 193 && val <= factorTable[guess + 1]; 
guess++);
  |             if(val == factorTable[guess])
  |             {
  |                 if(guess < 65)
  |                 {
  |                     SQLException ex = new 
SQLException(CoreException.getMessage((byte)3) + " trying to bind " + val);
  |                     throw ex;
  |                 }
  |                 if(guess > 192)
  |                 {
  |                     SQLException ex = new 
SQLException(CoreException.getMessage((byte)2) + " trying to bind " + val);
  |                     throw ex;
  |                 }
  |                 if(neg)
  |                 {
  |                     b[offset] = (byte)(62 - (127 - guess));
  |                     b[offset + 1] = 100;
  |                     b[offset + 2] = 102;
  |                     len = 3;
  |                 } else
  |                 {
  |                     b[offset] = (byte)(192 + (128 - guess));
  |                     b[offset + 1] = 2;
  |                     len = 2;
  |                 }
  |             } else
  |             {
  |                 if(guess < 64)
  |                 {
  |                     SQLException ex = new 
SQLException(CoreException.getMessage((byte)3) + " trying to bind " + val);
  |                     throw ex;
  |                 }
  |                 if(guess > 191)
  |                 {
  |                     SQLException ex = new 
SQLException(CoreException.getMessage((byte)2) + " trying to bind " + val);
  |                     throw ex;
  |                 }
  |                 long dBits = neg ? bits & 0x7fffffffffffffffL : bits;
  |                 long fractBits = dBits & 0xfffffffffffffL;
  |                 int binExp = rawExponent;
  |                 char digits[] = stmt.digits;
  |                 int nSignificantBits;
  |                 if(binExp == 0)
  |                 {
  |                     while((fractBits & 0x10000000000000L) == 0L) 
  |                     {
  |                         fractBits <<= 1;
  |                         binExp--;
  |                     }
  |                     nSignificantBits = 53 + binExp;
  |                     binExp++;
  |                 } else
  |                 {
  |                     fractBits |= 0x10000000000000L;
  |                     nSignificantBits = 53;
  |                 }
  |                 binExp -= 1023;
  |                 len = dtoa(b, offset, val, neg, false, digits, binExp, 
fractBits, nSignificantBits);
  |             }
  |         }
  |         b[byteoffset] = (byte)len;
  |         bindIndicators[indoffset] = 0;
  |         bindIndicators[lenoffset] = (short)(len + 1);
  |     }
  | 
  |     char digits[];
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955406#3955406

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955406

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to