Mapping
<bean class="org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping">
<property name="columnName" value="last_price_date"/>
<property name="propertyName" value="lastPriceDate"/>
<property name="converter" value="date"/>
</bean>
ResultSetRowMarshallHelper.marshallMappedData(ResultSet rs) does: String value = dialect.getStringValue(rs, ctpMapping);
This string value is passed into org.compass.core.lucene.LuceneResource.addProperty(String name, Object value)
where addProperty in turn calls into converter:
String strValue = converter.toString(value, propertyMapping);
Converter in my case is org.compass.core.converter.basic.DateConverter. That delegates to SimpleDateFormat.format (or something similar) and that throws
java.lang.IllegalArgumentException because object is not of type Date or Number but a String.
A better approach would be IMHO to:
1. Allow user to specify the type of the column
2. Look up type of the column from ResultSetMetaData
and call a correct getter on resultSet based on that. It also calls for changes in the ResultSetRowMarshallHelper to pass around Object value vs. String value.
Dmitry