new problem REST query 10.1 - every other request fails (400 unable to complete oper)

8601
25
Jump to solution
12-13-2012 06:17 AM
deleted-user-Ohz6rwd1kavx
New Contributor III
Hi

We are upgrading to ArcGIS Server 10.1 SP1 from 10.0.

We have noticed a new problem where REST layer queries are failing every other request. It is quite strange, but you can reproduce it by simply reissuing requests in browser or Fiddler.

Here is an example request (can use &f=html also, same result).

http://serverx/arcgis/rest/services/foldery/servicez/MapServer/0/query?where=%28%28KeyInstn+in+%2810...

Every other request fails with this result (json):

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

Clue:I started looking this while tracking down possible change to how ESRI is treating OutputFields in 10.1 compared to 10.0.

Anybody else seeing this?

Any recommendations on where to check next to narrow this one down?

Thanks,

-Cory
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
StevenMoore1
Occasional Contributor II
This is a known issues with 10.1 SP1, and has been logged as the following bug:

[ NIM086349 - Alternate Query (Get) requests fail in Version 10.1 SP1 ]

I don't know when this is scheduled to be fixed, but if you contact Support you can be attached to the bug. You can also check the status here:

http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg2MzQ5

View solution in original post

25 Replies
StevenMoore1
Occasional Contributor II
This is a known issues with 10.1 SP1, and has been logged as the following bug:

[ NIM086349 - Alternate Query (Get) requests fail in Version 10.1 SP1 ]

I don't know when this is scheduled to be fixed, but if you contact Support you can be attached to the bug. You can also check the status here:

http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMDg2MzQ5
deleted-user-Ohz6rwd1kavx
New Contributor III
Thanks for the reply and the link. This nimbus link worked better for me.

http://support.esri.com/en/bugs/nimbus/TklNMDg2MzQ5

We will be contacting support and requesting a fix (hopefully soon!) for this.

Do you know of any workarounds aside from issuing the request again if it fails the first time?

Thanks,

-Cory
0 Kudos
nicogis
MVP Frequent Contributor
The workarounds are

you can do request in POST

or

dirty the query


var dirty = (new Date()).getTime();
var query = new esri.tasks.Query();
query.where = "MyField= " + MyValue+ " AND " + dirty + "=" + dirty; 
...

JoanneMcGraw
Occasional Contributor III

In case anyone else comes up against this bug working with a FeatureLayer in a dynamic workspace (which I did), I implemented the above workaround in JSAPI by adding a definitionExpression similar to above. For example:

var dirty = (new Date()).getTime();

var lyrDynamic = new FeatureLayer(

  serviceurl + "/dynamicLayer"

  ,{

    id: "dynamicLayer"

    ,mode: FeatureLayer.MODE_ONDEMAND

    ,outFields: ["CLASS"]

    ,source: layerSource

    ,definitionExpression: dirty + "=" + dirty

  }

);

Cheers,

jtm

0 Kudos
deleted-user-Ohz6rwd1kavx
New Contributor III
Hi Domenico,

Thank you for the ideas, very helpful.

I have implemented your 'dirty' suggestion, and it appears to be working.

For anyone using the ESRI Silverlight API, you can set FeatureLayer.DisableClientCaching = true. This will add a unique time stamp parameter to the underlying REST request.... I found however that QueryTask does not behave this way. Thererfore, in this case, I followed the advice of generating a random time stamp and adding it to the Where.

Thanks very much again,

-Cory
0 Kudos
JoseThomas
New Contributor
This problem occurs only when the data of the MapService is FileGDB based or data is not copied to the server while publishing.

You can workaround this using either of these
1) Choose copy data to the Server while publishing the service
2) Change to Enterprise GDB
3) Change the service configuration to set "hasStaticData": "true", if your service data doesn�??t change.
http://hostname:6080/arcgis/admin/se...MapServer/edit
0 Kudos
CarmenDurham
Occasional Contributor
Do you know if using map services using layers in  SQL Express DB with SDE for Workgroup will work?  I am trying to avoid using our current SQL Server 2005 (yes, we are stuck with this for now) for these particular map services.  We were going to try to use a file gdb that is updated weekly through python. 

Thanks,
Carmen
0 Kudos
deleted-user-Ohz6rwd1kavx
New Contributor III
Hi

Interesting note from josethom

The REST mapservices that I am using sit on top of both SQL Server 2008 and.... file geodatabases.

I did not investigate whether we were seeing this problem with just the file geodatabase-based services, but this could be the case.

Anyway, thanks for the reply, and I hope this additional note helps someone.

-Cory
0 Kudos
TonyCollins
New Contributor III
Has this been resolved yet?

This is clearly a massive bug that you can't use FGDB based services IF you want to perform queries?
0 Kudos