PROBLEM

Joining a shapefile to a DBF table fails in Unix: jointables reference is case-sensitve

Last Published: April 25, 2020

Description

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:

Code:
<WORKSPACES>
<SHAPEWORKSPACE name="shp_ws-0" directory="/server/dir1/data" />
</WORKSPACES>
<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]" />
... etc.

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.

Cause

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:

Code:
com.esri.mo.client.aims.InvalidStreamDataException:
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:

Code:
<SPATIALQUERY jointables="LOOKUP" joinexpression="To=[cities.city_code],From=[lookup.city_code],Type=[exact]" />

    Article ID:000005888

    Software:
    • Legacy Products

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic