[ https://issues.apache.org/jira/browse/SOLR-888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amit Nithian updated SOLR-888: ------------------------------ Attachment: DateFormatTransformer.java Lines 69,70 contain the changes. Sorry I didn't download the source from trunk so I am just attaching the entire .java file. > 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 > Attachments: DateFormatTransformer.java > > Original Estimate: 0.02h > Remaining Estimate: 0.02h > > 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.