Hello,
Trying to use the field conversion:
I have a class "Application" that has an attribute "releaseDate" to store a date (no
time).
In my database (MS SQL) the type is: datetime.
In OJB repository the jdbc-type is: DATE.
In my java code I use the class java.util.Date.
I added the line below in OJB repository:
conversion="org.apache.ojb.broker.accesslayer.conversions.Java
Date2SqlDateFieldConversion"
But this produces an error:
[DEFAULT] ERROR: Error in operation [set] of object
[PersistentFieldPropertyImpl], java.lang.IllegalArgumentException
[DEFAULT] ERROR: Declaring class [com.itservices.woc.data.Application]
[DEFAULT] ERROR: Property Name [releaseDate]
[DEFAULT] ERROR: Property Type [java.sql.Date]
[DEFAULT] ERROR: anObject was class
[com.itservices.woc.data.Application]
[DEFAULT] ERROR: aValue was class [java.util.Date]
org.apache.ojb.broker.PersistenceBrokerException: Unable to
build object instance :class com.itservices.woc.data.Application
at
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.buildWi
thReflection(Unknown Source)
at
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readObj
ectFrom(Unknown Source)
at
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResu
ltSet(Unknown Source)
at
org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown Source)
etc...
Could you help me?
Thanks
Sylvain
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]