Using Oracle + Java5 ? Beware, a bug is waiting for u.

Hi Guys,

I am back with a techie post. During my recent blog search I found an interesting post about a bug regarding the oracle JDBC driver. For those who are not Java guy’s please turn off your sight from this post. And for those, who are still interested to know about JDBC, check this out. And a driver is nothing but a java class which will take the responsibility to provide you the required stuff to access the database from your java program.

If you are using oracle as your database and want to upgrade your Java App to Java 5, Just be careful. There was a recent BUG that is reported to Oracle. Here we go in to the details of it.

Create a Simple table:

CREATE TABLE TEST_TABLE

{

VALUE NUMBER

}

Say your java code goes as shown below……

Configuration:

Oracle version 9.2, java version 1.5. JDBC driver is ojdbc14.jar provided from oracle.

If you try to run the following query…. Stay calm …. YOU WILL BE SURPRISED.

Select * from TEST_TABLE;

————————————

1250000

If you observe correctly, one zero is missing in the above result. And it is some times even worse. It sometimes may give 12, 1250…etc. This bug has been reported to oracle and Oracle replied saying that this is because of the change in the way that BigDecimal.toString() method behaves in JAVA 5.

To know more about this click the following link.

http://www.jroller.com/morisil/entry/can_i_trust_oracle_jdbc

For those who are bored with this techie post,

Hold on,

There is some thing interesting coming in.

Until then,

See ya,

Durga Prasad

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s