[ 
https://issues.apache.org/jira/browse/SOLR-888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar resolved SOLR-888.
----------------------------------------

    Resolution: Fixed

Committed revision 725618.

Thanks Amit!

> DateFormatTransformer cannot convert non-string type
> ----------------------------------------------------
>
>                 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
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.4
>
>         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.

Reply via email to