Friday, April 28, 2006

I have changed the look and feel of my blog, courtesy a nice template provided by Blogspot.

Learnings for Today

I was creating a map and using the key as a java.sql.Date object. I created a sql Date by the valueof builtin which accepts the yyyy-mm-dd format. When I tried to retrieve the value using the key, it failed some times. I was really surprised. It also stores the time along with the date in the object. When i try to get it , by using map.get the time is different, of course and it fails. So , i realised that it is not good to keep a date object as the key. Then i changed the code to an integer by appending yyyymmdd . Voila ! , now it works like a charm.

Rest of the day, i spent mostly on debugging jdbc code. There is a new stuff in JDBC 3.0 that allows you to return autogenerated keys. I downloaded the latest ojdbc14.jar , put it in my web-inf/lib in tomcat and it worked fine. However, when i deployed my EAR in 10g AS, for some reason it gives me an abstract method error in the preparedstatement class. I was breaking my head on that. Still to come up with a solution for that issue.

Hope to update my blog more frequently in future.

No comments: