Problem: Joining a shapefile to a DBF table fails in Unix: jointables reference is case-sensitve
Joining a shapefile to a DBF table fails in Unix: jointables reference is case-sensitve. The SPATIALQUERY statement must be correctly constructed to perform the join, for example:
<SHAPEWORKSPACE name="shp_ws-0" directory="/server/dir1/data" />
<LAYER type="featureclass" name="Cities layer with join" visible="true" id="3">
<DATASET name="cities" type="point" workspace="shp_ws-0" />
<SPATIALQUERY jointables="lookup" joinexpression="To=[cities.city_code],From=[lookup.city_code],Type=[exact]" />
Also, it has been confirmed that in Spatial Server; for example, a user account running the Monitor daemon, has permission to read and write to the data workspace.
However, the LAYER in which the join is performed displays in the Table of Contents, but it does not display in the map.
The name of external table needs to be in upper-case.
Suspicion that this is the cause is verified when ArcExplorer Java is used to display a Feature map service. As noted above, the features of the joined layer do not display in the map. Furthermore, when an attempt to select points from the joined layer, by using the selction tool within an extent where the features should otherwise exist, the following error message is generated in the ArcExplorer Java Message Console:
A general exception has occurred:
(SpatialServer has detected the following error: Cannot validate file /server/dir1/data/LOOKUP.dbf.)
Solution or Workaround
Rename the external table to give it an UPPER CASE file name. For example, change lookup.dbf to LOOKUP.dbf.
Also, the value of the 'jointables' attribute must also reference the external table by using an UPPER CASE file name. For example:
<SPATIALQUERY jointables="LOOKUP" joinexpression="To=[cities.city_code],From=[lookup.city_code],Type=[exact]" />