ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankaranarayanan" <Sundar.Sankaranaraya...@phoenix.edu>
Subject RE: iBATIS no longer allows me to set java.sql.Timestamp property
Date Fri, 08 Feb 2008 18:15:01 GMT
I am right using java.sql.Date for a Date mapping and it works fine for
me.. Did u try and restart the servers after you had committed the
change to the database (Just a wild guess to the problem)


From: Nathan Maves [mailto:nathan.maves@gmail.com] 
Sent: Friday, February 08, 2008 10:56 AM
To: user-java@ibatis.apache.org
Subject: Re: iBATIS no longer allows me to set java.sql.Timestamp

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 <tony.lozina@pepsi.com> 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
	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 'com.pbg.roadnet.bo.WorkerAction@d8ca48'.
	java.lang.IllegalArgumentException: argument type mismatch;
nested exception
	is com.ibatis.common.jdbc.exception.NestedSQLException:
	--- The error occurred in
	--- The error occurred while applying a result map.
	--- Check the selectActionsWithinRange-AutoResultMap.
	--- The error happened while setting a property on the result
	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
	View this message in context:
	Sent from the iBATIS - User - Java mailing list archive at

View raw message