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

Key: CMP-931
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Tom Purcell
Votes: 0
Watchers: 0
Operations

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

DataColumnToPropertyMapping's excludeFromAll parameter type of the setter match the return type of the getter

Created: 07/May/10 09:31 AM   Updated: 07/May/10 09:31 AM
Component/s: Compass::Core
Affects Version/s: 2.2.0 GA
Fix Version/s: None

Environment:
OS: OpenSuse Linux 11.1 (Linux 2.6.27.45-0.1-default x86_64)
JVM: java version "1.6.0_11"
         Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
         Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)


 Description  « Hide
I've inherited some code and I'm trying to upgrade it from Compass 1.2.1 to 2.2.0. Its a Spring application and the old app context has the following entry:
<bean class="org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping">
<property name="columnName" value="site_name"/>
<property name="propertyName" value="site_name_untokenized"/>
<property name="propertyIndexString" value="UN_TOKENIZED"/>
<property name="excludeFromAll" value="true"/>
</bean>
The problem I have is with the last property: excludeFromAll. In 2.2.0 DataColumnToPropertyMapping.setExcludeFromAll() takes a String but getExcludeFromAll() returns ExcludeFromAll which is an Enum. I've tried several configurations including:
<bean class="org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping">
<property name="columnName" value="supplier_name"/>
<property name="propertyName" value="supplier_name_untockenized"/>
<property name="propertyIndexString" value="UN_TOKENIZED"/>
<property name="excludeFromAll">
<util:constant static-field="org.compass.core.mapping.ExcludeFromAll.YES"/>
</property>
</bean>

But I keep getting essentially the same error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemMapping' defined in class path resource http://applicationContext-item-search.xml: Cannot create inner bean 'org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping#57a7ddcf' of type http://org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping while setting bean property 'dataMappings' with key [2]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping#57a7ddcf' defined in class path resource http://applicationContext-item-search.xml: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'excludeFromAll' of bean class http://org.compass.gps.device.jdbc.mapping.DataColumnToPropertyMapping: Bean property 'excludeFromAll' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Further info and work around on forum at: http://forum.compass-project.org/thread.jspa?threadID=216666&tstart=0



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.