DateFormatTransformer can't handle objects of type java.sql.TimeStamp
---------------------------------------------------------------------
Key: SOLR-888
URL: https://issues.apache.org/jira/browse/SOLR-888
Project: Solr
Issue Type: Bug
Components: contrib - DataImportHandler
Affects Versions: 1.3
Environment: any
Reporter: Amit Nithian
When using the DateFormatTransformer, if the source column is of type
java.sql.TimeStamp, an exception is thrown converting this to a String.
Solution is to not typecast to a String but rather invoke the .toString()
method of the object to retrieve the string representation of the object.
(About line 68)
} else {
String value = (String) o;
aRow.put(column, process(value, fmt));
}
should be
} else {
String value = o.toString();
aRow.put(column, process(value, fmt));
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.