After updating from 1.2.M2 to 1.2.GA we've starting getting the following problem:
java.lang.IllegalArgumentException: Failed to find class/resource mapping for alias [de] from path [de.disy.preludio2.base.CIResponsibleParty.PositionName]
at org.compass.core.mapping.CompassMapping.getResourcePropertyMappingByPath(CompassMapping.java:167)
at org.compass.core.mapping.CompassMapping.getResourcePropertyMappingsByPath(CompassMapping.java:186)
at org.compass.core.mapping.ResourcePropertyLookup.<init>(ResourcePropertyLookup.java:44)
at org.compass.core.mapping.CompassMapping.getResourcePropertyLookup(CompassMapping.java:146)
at org.compass.core.impl.DefaultCompassQueryBuilder.wildcard(DefaultCompassQueryBuilder.java:476)
at de.disy.preludio2.base.query.processor.compass.ResponsiblePartyQueryProcessor.getQuery(ResponsiblePartyQueryProcessor.java:36)
....
The OSEM declaration is as follows:
<property ...
class="java.lang.String"
managed-id="false"
name="PositionName">
<meta-data store="no">de.disy.preludio2.base.CIResponsibleParty.PositionName</meta-data>
</property>
Thrown from the following code:
queryBuilder.wildcard("\'de.disy.preludio2.base.CIResponsibleParty.PositionName\'", value)
We need fully qualified names as the class structure is very large and many field names are repeated.
I have investigated and it seems that between 1.2.M2 and 1.2.GA you have refactored the ResourcePropertyLookup from inner class to the top level.
In 1.2.M2 it was:
public ResourcePropertyLookup(String name) {
//...
// Direct access to the resource property mapping by path
resourcePropertyMappings = (ResourcePropertyMapping[]) resourcePropertyMappingByPath.get(path);
/...
}
In 1.2.GA:
public ResourcePropertyLookup(CompassMapping compassMapping, String name) {
// ...
// Access via the getResourcePropertyMappingByPath(...) method:
this.resourcePropertyMapping = compassMapping.getResourcePropertyMappingByPath(name);
// ...
}
As we see, resource property mapping access is done in 1.2.GA via the getResourcePropertyMappingByPath(name) method. This method does not consider path escaping.
This is rather critical for us since we rely on fully qualified names and use path escaping heavily. We'll have to rollback to 1.2.M2.
Would you please consider correcting this in future releases? Thank you.