> I have an field :
> 
> <field-descriptor column="ep_data" name="data" jdbc-type="DATE" 
> conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFieldConversion"></field-descriptor>
> 
> but accessing data I got an error :
> 
> Unable to convert between java.util.Date and JAVA_OBJECT.
> java.sql.SQLException: Unable to convert between java.util.Date and 
> JAVA_OBJECT.
> 
> I tried to do it also with JavaDate2SqlTimestampFieldConversion.
> 
> database : MS SQL Server 2000
> driver : JTDS
> data type in database : datetime (I tried with timestamp too)

Are you sure that's the relevant field descriptor ? The exception says
that the JDBC driver tried to convert an java.util.Date object into
the database-internal data structure for JAVA_OBJECT (which is a JDBC
type).
This means that neither a conversion has been applied (it's still a
java.util.Date, not a java.sql.Date) and that the type of the database
column is something that maps to JAVA_OBJECT (or so thinks your JDBC
driver).
Could you perhaps post the complete class-descriptor and the
corresponding table definition as well as the complete SQL exception ?

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to