For the record, I have finally fixed it by adding the following two converters:
public static class OracleTIMESTAMPToTimestamp extends
AbstractConverter<oracle.sql.TIMESTAMP, java.sql.Timestamp> {
public OracleTIMESTAMPToTimestamp() {
super(oracle.sql.TIMESTAMP.class, java.sql.Timestamp.class);
}
public java.sql.Timestamp convert(oracle.sql.TIMESTAMP obj) throws
ConversionException {
try {
return obj.timestampValue();
} catch (Exception e) {
throw new ConversionException(e);
}
}
}
public static class SqlDateToTime extends AbstractConverter<java.sql.Date,
java.sql.Time> {
public SqlDateToTime() {
super(java.sql.Date.class, java.sql.Time.class);
}
public java.sql.Time convert(java.sql.Date obj) throws
ConversionException {
return new java.sql.Time(obj.getTime());
}
}
However it is a bit annoying since it was working before... also I don't know
if (and how) this code can be contributed back: the first converter needs the
oracle driver in the classpath to compile.
Jacopo
On Dec 5, 2009, at 9:26 PM, Ruth Hoffman wrote:
> Hi Jacopo:
> Don't know about the converter framework...I seem to remember that Oracle
> changed the name of the SQL TIMESTAMP object for more recent versions (9x or
> 10i or something like that). So maybe the OFBiz converter is looking for the
> TIMESTAMP object in the wrong place or calling it by a name that doesn't
> exist anymore. I may have had to change the converter as well. Or maybe I'm
> just confusing all this with the Oracle CLOB modifications I had to make...
>
> It was a while ago when I ran into this. Anyhow, I do seem to recall there
> was some discussion about this on the Oracle developer's forum at the time.
>
> Regards,
> Ruth
> Jacopo Cappellato wrote:
>> Thank you Ruth, I will investigate more but... but my guess is that this
>> error is related to the recent changes for the Converter framework... in
>> fact this error is happening after the OFBiz upgrade to the trunk.
>>
>> Jacopo
>>
>> On Dec 5, 2009, at 7:59 PM, Ruth Hoffman wrote:
>>
>>
>>> Hey Jacopo:
>>> I had a similar problem about 9 months ago...depends on the version of
>>> Oracle. But if I remember correctly, you may need to find an Oracle jar
>>> file that supports the TIMESTAMP object and add it to the classpath.
>>>
>>> I don't have access to that OFBiz instance anymore so I can't verify what I
>>> did...but I think that was the solution. FYI - there was a similar problem
>>> with ORACLE CLOBs.
>>>
>>> Anyhow, hope that helps.
>>> Ruth
>>>
>>> Jacopo Cappellato wrote:
>>>
>>>> I am getting the following error trying to load seed data in the trunk
>>>> using an Oracle DB.
>>>>
>>>> ------------
>>>> [java] Exception: java.lang.ClassNotFoundException
>>>> [java] Message: No converter found for
>>>> oracle.sql.TIMESTAMP->java.sql.Timestamp
>>>>
>>>>
>>>> Any hints on how to fix this?
>>>>
>>>> Jacopo
>>>>
>>>>
>>>>
>>
>>
>>