I have never found a case where using the java.util.Date for my Java object would not work. I would suggest using that on the Java side.
On Feb 8, 2008 9:55 AM, MrNobody <[EMAIL PROTECTED]> wrote: > > I had suffered a hard drive meltdown a couple of weeks ago and had to > restore > a project I am working on which involves loading objects from an Oracle > database using iBATIS. > > Now I finally got the database and the application back up and running > (the > database I was using to develop on was also a local instance) but when I > run > my project iBATIS is complaining about setting the Timestamp properties on > my result class. > > --- Cause: java.lang.RuntimeException: Error setting property > 'setActionDate' of '[EMAIL PROTECTED]'. Cause: > java.lang.IllegalArgumentException: argument type mismatch; nested > exception > is com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in com/pbg/roadnet/dao/sqlmap/WorkerAction.xml. > --- The error occurred while applying a result map. > --- Check the selectActionsWithinRange-AutoResultMap. > --- The error happened while setting a property on the result object. > > the "ActionDate" property on my java object- which was restored from my > old > project and is 100% identical to when it ran fine before- is a > java.sql.Timestamp field. > > So what could suddenly cause this to fail? > > I thought of two possibilities: one is that the driver I am using now is > not > the same (unfortunately I did not backup the driver I was using before so > I > just downloaded the latest Oracle 10g driver - ojdbc14.jar). I could maybe > start trying some older drivers if you think this is the most likely > cause. > > the second is that maybe I did not use the right column type on the > database > tables. See, while the database version itself is exactly the same (Oracle > 10g Express Edition) the tables had to be rebuilt not from scripts > matching > my old schema but by reverse engineering them based on my sql map files > (basically looked at what columns I was selected, their types, and created > tables to match). So the bottom line with this is, I cant remember if I > used > DATE or TIMESTAMP as the Oracle column type. I am very sure though, that I > actually used DATE, which is what I have now. But for the hell of it I > tried > TIMESTAMP and still iBATIS is spitting that error at me. > > Do you have any ideas what could be causing this sudden conflict? > -- > View this message in context: > http://www.nabble.com/iBATIS-no-longer-allows-me-to-set-java.sql.Timestamp-property-tp15359372p15359372.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > >
