SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-307
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Michael Amster
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

Please add Converter date format support for java.sql.* types

Created: 25/Oct/06 04:10 AM   Updated: 28/Oct/06 09:16 AM
Component/s: Compass::Core
Affects Version/s: 1.1 M2
Fix Version/s: 1.1 M3

Environment: Linux, Java 5 jdk 1.5.0_8


 Description  « Hide
I am seeing the following exception in Compass 1.1M2 & 1.1M3 - this worked in earlier versions like 1.0.

2006-10-25 01:06:56,937 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\mvspy\WEB-INF\classes\com\wnx\mvspy\applicationContext-compass.xml] : Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Meta data format attribute can only work on format converters. The converter [org.compass.core.converter.extended.SqlTimestampConverter] is not one.
Caused by:
java.lang.IllegalArgumentException: Meta data format attribute can only work on format converters. The converter [org.compass.core.converter.extended.SqlTimestampConverter] is not one.
at org.compass.core.converter.mapping.osem.MetaDataFormatDelegateConverter.setDele gatedConverter(MetaDataFormatDelegateConverter.java:49)
at org.compass.core.config.process.MappingProcessorUtils.lookupConverter(MappingPr ocessorUtils.java:78)
at org.compass.core.config.process.ConverterLookupMappingProcessor$OsemConverterLo okup.onClassPropertyMetaDataMapping(ConverterLookupMappingProcessor.java:136)
at org.compass.core.mapping.osem.OsemMappingUtils.iterateMappings(OsemMappingUtils .java:180)
at org.compass.core.config.process.ConverterLookupMappingProcessor.lookupConverter (ConverterLookupMappingProcessor.java:86)
at org.compass.core.config.process.ConverterLookupMappingProcessor.process(Convert erLookupMappingProcessor.java:62)
at org.compass.core.config.CompassMappingProcessor.process(CompassMappingProcessor .java:54)
at org.compass.core.config.CompassConfiguration.buildCompass(CompassConfiguration. java:187)
at org.compass.spring.LocalCompassBean.newCompass(LocalCompassBean.java:332)

The code that causes this problem is below:

/**

  • Get the submitted time
  • @return The timestamp that the clip was submitted to the site
  • @hibernate.property column="submit_time" type="timestamp"
    */
    @SearchableProperty(name="submitTimeProperty")
    @SearchableMetaData(name="submitTime", format="YYYY-MM-DD",index=Index.UN_TOKENIZED)
    public Timestamp getSubmitTime(){
    return submitTime;
    }


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 28/Oct/06 09:15 AM
java.sql date types can now have a format associated with them. If none is provided, Compass defaults to their toString and fromString.