BigDecimal
(Problem with oracle jdbc implementation(java 1.4) )
Few days before, I stumbled upon an intriguing defect. It was related to update of number(13,10) column in oracle database. The same piece of jdbc sql update was working good while debugging my project in eclipse workbench setup. But same code was generating random output while running it in Jboss server. That was surprising for me. But it was not true. Same code was not working.
Busy debugging:
I tried all possible permutations and combinations for debugging, I could not identify reason. Java is platform independent and should behave same every where(:-) though in my case the JDK and OS was same). Then I wrote simple test program to get meta data information about jdbc implementation. Metadata results are not confusing. It says jdbc major version is 11 and minor is 2. Which is definitely something specific to oracle implementation. It does not give me any detail for jdbc version it implements. This is not a problem though. I have already got oracle jdbc implementation version as 11.2.x(ojdbc6.jar).
Solution:
My sample code was working good with this jdbc implementation. Now I changed it to(ojdbc14.jar). This change started its ugly behavior for updating BigDecimal.
ojdbc6.jar ------- JDBC implementation of oracle (in Java 6)
ojdbc5.jar ------- JDBC implementation of oracle (in Java 5)
ojdbc14.jar ------- JDBC implementation of oracle (in Java 1.4 , mea-culpa)
Busy debugging:
I tried all possible permutations and combinations for debugging, I could not identify reason. Java is platform independent and should behave same every where(:-) though in my case the JDK and OS was same). Then I wrote simple test program to get meta data information about jdbc implementation. Metadata results are not confusing. It says jdbc major version is 11 and minor is 2. Which is definitely something specific to oracle implementation. It does not give me any detail for jdbc version it implements. This is not a problem though. I have already got oracle jdbc implementation version as 11.2.x(ojdbc6.jar).
Solution:
My sample code was working good with this jdbc implementation. Now I changed it to(ojdbc14.jar). This change started its ugly behavior for updating BigDecimal.
ojdbc6.jar ------- JDBC implementation of oracle (in Java 6)
ojdbc5.jar ------- JDBC implementation of oracle (in Java 5)
ojdbc14.jar ------- JDBC implementation of oracle (in Java 1.4 , mea-culpa)
No comments:
Post a Comment