On Mon, Mar 30, 2009 at 8:52 PM, Giovanni De Stefano < giovanni.destef...@gmail.com> wrote:
> Hello all, > > I have a little problem with DIH and DateFormatTransformer. > > My column in the DB contains an Oracle TIMESTAMP; the corresponding field > is > of type date in the Solr schema; I specified a DateFormatTransformer for > the > entity; the field definition is as follow: > > <field column="WHATEVER" name="whatever" > dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss'+'SSSS"/> > > but I keep getting a ClassCastException... > > WARNING: transformer threw error > java.lang.ClassCastException: java.sql.Date The jdbc equivalent of an Oracle timestamp is java.sql.Date which is a sub-class of java.util.Date. DateFormatTransformer is used to convert strings to a date object. Therefore, if your solr field is of date type, you don't need to use DateFormatTransformer at all. -- Regards, Shalin Shekhar Mangar.