We have a geoprocessing service running in ArcGIS Server 10 sp1 java edition. It is basically the same as the population summary/demographics GP Example.
The geoprocessing service runs fine in ArcMap and in ArcGIS Explorer as a service from ArcGIS Server.
When trying to implement the service within a web app using the javascript api based on this sample http://help.arcgis.com/en/webapi/javascript/arcgis/demos/gp/gp_zonalstats.html (and even with the flex sample) I keep getting "dojo.io.script.jsonp_dojoIoScript2._jsonpCallback({"error":{"code":500,"message":"Error executing task 'SumZone'. Please check your parameters.","details":[]}});"
We have tried everything
1. Running it locally
2. local jobs folder, etc
3. Both on 9.3.1 and 10
Here is the REST request with the geometry payload to execute the service
http://igskaecgas010:8399/arcgis/rest/services/tmtools/ZonalStats/GPServer/SumZone/execute?f=json&env%3AoutSR=102100&env%3AprocessSR=102100&inputPoly={%22geometryType%22%3A%22esriGeometryPolygon%22%2C%22features%22%3A[{%22geometry%22%3A{%22rings%22%3A[[[-12089524.992070802%2C4855463.220549357]%2C[-12083410.029807992%2C4851488.49507853]%2C[-12084021.526034273%2C4851488.49507853]%2C[-12086773.259052537%2C4851488.49507853]%2C[-12089524.992070802%2C4849654.006399686]%2C[-12089524.992070802%2C4853017.2356442325]%2C[-12089524.992070802%2C4855463.220549357]]]%2C%22spatialReference%22%3A{%22wkid%22%3A102100}}}]%2C%22sr%22%3A{%22wkid%22%3A102100}}&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback
Here is the web app (but the map server is internal so you wont be able to see that).
A six pack to the one who can help me with this!
I am certain the json payload is being built ok because I have copied and used in on one of ESRI's samples and it works. Here it is decoded:
{"geometryType":"esriGeometryPolygon","features": [{"geometry":{"rings":[[[-12035713.324158048,4906523.155443832],[-12006361.505296549,4886955.276202832],[-12035713.324158048,4877171.336582333],[-12035713.324158048,4906523.155443832]]],"spatialReference":{"wkid":102100}}}],"sr":{"wkid": 102100}}
Also, here is an error Im getting in the logs. The grid does have a .vat so that isn't the problem.
<Msg time='2011-04-11T15:40:16' type='ERROR' code='20010' target='tmtools/zonal.GPServerSync' methodName='GPServerSync.CheckMessages' machine='IGSKAECGAS010' process='4936' thread='1504'>Executing (SumZone): ZonalStatsSum "Feature Set" in_memory\results Start Time: Mon Apr 11 15:40:16 2011 Executing (Zonal Statistics as Table): ZonalStatisticsAsTable "Feature Set" Id c:\arcgisserver\sumzone\grid.gdb\picall_wmb in_memory\results DATA SUM Start Time: Mon Apr 11 15:40:16 2011 ERROR 010160: Unable to open raster t_t3626\t_t3626. Zonal statistics program failed ERROR 010067: Error in executing grid expression. Failed to execute (Zonal Statistics as Table). Failed at Mon Apr 11 15:40:16 2011 (Elapsed Time: 0.00 seconds) Failed to execute (SumZone). Failed at Mon Apr 11 15:40:16 2011 (Elapsed Time: 0.00 seconds)</Msg>
<Msg time='2011-04-11T15:40:16' type='ERROR' code='20010' target='tmtools/zonal.GPServerSync' methodName='GPServerSync.CheckMessages' machine='IGSKAECGAS010' process='4936' thread='1504'>Error executing tool.: ERROR 010160: Unable to open raster t_t3626\t_t3626. Zonal statistics program failed ERROR 010067: Error in executing grid expression. Failed to execute (Zonal Statistics as Table). Failed to execute (SumZone).</Msg>
function computeZonalStats(geometry) {
/*After user draws shape on map using the draw toolbar compute the zonal*/
map.showZoomSlider();
map.graphics.clear();
var symbol = new esri.symbol.SimpleFillSymbol("none", new esri.symbol.SimpleLineSymbol("dashdot", new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]));
var graphic = new esri.Graphic(geometry,symbol);
map.graphics.add(graphic);
toolbar.deactivate();
var features= [];
features.push(graphic);
var featureSet = new esri.tasks.FeatureSet();
featureSet.features = features;
var params = {};
params.inputPoly = featureSet;
gp.execute(params, displayResults, errorStatus);
}
Start Time: Wed Apr 13 11:32:31 2011 ERROR 010160: Unable to open raster t_t966\t_t966. Zonal statistics program failed ERROR 010067: Error in executing grid expression. Failed to execute (Zonal Statistics as Table).