AnsweredAssumed Answered

ArcGIS server 10.1 rest api queries fail inconsistently

Question asked by kapayne@uga.edu on Mar 2, 2015
Latest reply on Oct 30, 2017 by scooter

Apologies for posting this both here and GIS.stackExchange (ArcGIS server 10.1 rest api queries fail inconsistently - Geographic Information Systems Stack Exchange)

 

I have a set of Map and Esri Feature Services running on a 10.1 ArcGIS Server, with SQL Server in the back end.

 

When I query the layers for either the geometry or OIDs using the rest interface, the query only works in certain instances.

  1. If I query a point layer the result works as expected and I get the data
  2. If I query a polygon layer like this, it fails: http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?returnGeometry=true&f=json

I get the error message

{"error":{"code":400,"message":"Unable
to complete operation.","details":["Unable to perform query
operation."]}}

 

The server log files show: Database error:

Operation without query criteria is not allowed.

 

However this query (same service, different polygon layer) works as expected and returns the feature geometry:

http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/6/query?returnGeometry=true&f=json

There are 2 polygon layers that I can query and get the expected result but all other polygon layers fail and for the life of me I cannot see any difference in the properties of the feature classes that fail vs those that do not.

 

If I dirty the query (by adding a where clause 1=1) I get the expected result; so for example, this query works:

http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?where=1%3D1&returnGeometry=true&f=json

 

What I’ve looked at:

    1. I have not hit the max feature limit set on the server or the service
    2. the behavior is consistent across browsers
    3. the behavior is consistent using either get or post
    4. I have rebuilt the spatial indices
    5. The behavior is consistent if I ask for json or html response

I’d be grateful for any pointers or areas that I should look at.

 

Thanks in advance!

 

Message was edited by: Asrujit SenGupta

Outcomes