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

Key: CMP-510
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Shay Banon
Reporter: Aleksei Valikov
Votes: 0
Watchers: 0
Operations

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

Escaped paths could not be found

Created: 17/Jan/08 05:13 AM   Updated: 18/Jan/08 05:54 AM
Component/s: None
Affects Version/s: 1.2 GA
Fix Version/s: 1.2.1, 2.0 M1


 Description  « Hide
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.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 17/Jan/08 02:26 PM
Thanks for finding this. I have fixed this on both 2.0 and 1.2 branch. Can you try an build a version out of the 1_2 branch (a simple "ant release") and see if it works? If it does, I will release 1.2.1 in the beginning of next week (are you ok with this timeframe?)

Aleksei Valikov added a comment - 18/Jan/08 04:26 AM
Time frame is ok.
I'll build/deploy new version and report back.

Aleksei Valikov added a comment - 18/Jan/08 05:54 AM
I've build and deployed the current SVN 1_2 branch checkout as the 1.2.1 version - it worked out fine, previously failing unit tests are back in green again.
Thank you!