We have a feature called Unit in the 'feat' workspace, data for which is in an 
Oracle database. Columns of UNIT are REC_ID, RAW_UUID, UUID, and CODESPACE. 
REC_ID is the primary key; the combination of the last two is a unique key.

Unit has one or more child elements representing the state of the UNIT feature 
during various time slices. The child table columns of interest for my issue 
are REC_ID (primary key of table UNIT_TS) and UNIT_REC_ID  (foreign key to 
UNIT). The source for the time slice feature is a database view UNIT_TS_VIEW 
which is a join of UNIT_TS and a few other tables. There is no linkage to any 
other feature.

The schema for a Unit feature with REC_ID=12345 and UNIT_TS.REC_ID=67890 is 
like this:

   <feat:Unit gml:id="Unit.Rec.Id.12345">
       <gml:identifier codeSpace="[CODESPACE value]">[UUID 
value]</gml:identifier>
       <feat:timeSlice>
           <feat:UnitTimeSlice gml:id="TimeSlice.67890">
                <!-the various elements belonging to this time slice -->
           </feat:UnitTimeSlice>
      <feat:timeSlice>
      <!-Additional time slices if they exist -->
   </feat:Unit>

When I do a WFS query filtering on the value of gml:identifier, I get the 
expected results, and there are no errors in the log. I can also filter on 
elements that are part of UnitTimeSlice. But while the results are still as 
expected, I get errors in the log that look like this:

21:14:29,098 WARN  [org.geotools.filter] (http-gis.dev/10.160.72.33:9443-3) 
Error occured mapping UNIT_REC_ID to feature type: 
java.lang.IllegalArgumentException: Could not find working property accessor 
for attribute (UNIT_REC_ID) in object (SimpleFeatureTypeImpl UNIT identified 
extends Feature(REC_ID:REC_ID,RAW_UUID:RAW_UUID,UUID:UUID,CODESPACE:CODESPACE))
        at 
org.geotools.filter.AttributeExpressionImpl.evaluate(AttributeExpressionImpl.java:229)
 [gt-main-16.2.jar:]
[remainder of stack trace omitted]
Caused by: java.lang.IllegalArgumentException: x-path gives no results.
        at 
org.geotools.filter.expression.FeaturePropertyAccessorFactory$FeaturePropertyAccessor.get(FeaturePropertyAccessorFactory.java:279)
 [gt-complex-16.2.jar:]

Any idea what I need to do to get rid of these errors when filtering on an 
element in the time slice? The mapping file feat_Unit.xml has the following 
relevant excerpts:

        <typeMappings>
                <FeatureTypeMapping>
                        <sourceDataStore>datastore</sourceDataStore>
                        <sourceType>UNIT</sourceType>
                        <targetElement>feat:Unit</targetElement>
                        <attributeMappings>
                                <AttributeMapping>
                                        
<targetAttribute>feat:Unit</targetAttribute>
                                        <idExpression>
                                                
<OCQL>strConcat('Unit.Rec.Id.',REC_ID)</OCQL>
                                        </idExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                                        
<targetAttribute>gml:identifier</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>UUID</OCQL>
                                        </sourceExpression>
                                        <ClientProperty>
                                                <name>codeSpace</name>
                                                <value>CODESPACE</value>
                                        </ClientProperty>
                                </AttributeMapping>
                                <AttributeMapping>
                                        
<targetAttribute>feat:timeSlice</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>REC_ID</OCQL>
                                                
<linkElement>feat_UnitTimeSlice</linkElement>
                                                
<linkField>FEATURE_LINK</linkField>
                                        </sourceExpression>
                                        <isMultiple>true</isMultiple>
                                </AttributeMapping>

                        </attributeMappings>
                </FeatureTypeMapping>


                <FeatureTypeMapping>
                        <mappingName>feat_UnitTimeSlice</mappingName>
                        <sourceDataStore>datastore</sourceDataStore>
                        <sourceType>UNIT_TS_VIEW</sourceType>
                        <targetElement>feat:UnitTimeSlice</targetElement>
                        <isDenormalised>true</isDenormalised>
                        <attributeMappings>
                                <AttributeMapping>
                                        
<targetAttribute>feat:UnitTimeSlice</targetAttribute>
                                        <idExpression>
                                                
<OCQL>strConcat('TimeSlice.',REC_ID)</OCQL>
                                        </idExpression>
                                </AttributeMapping>

                                <AttributeMapping>
                                        
<targetAttribute>FEATURE_LINK</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>UNIT_REC_ID</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>

                                 <!-Rest of the attribute mappings for 
UnitTimeSlice -->
            </attributeMappings>
        </FeatureTypeMapping>



---------------------------------------------------------------
Michael Stein, Northrop Grumman Defense Systems
7555 Colshire Dr 4098S
McLean, VA 22102
703-963-6654(cell); 301-429-5468(ofc)

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to