Error Submitting Job: geoprocessing task wont complete

Discussion created by rikke on Apr 14, 2011
Latest reply on Apr 15, 2011 by hzhu
Hi there,

I have setup a geoprocessing task (a python script) that generates a PDF based on a map document "template". The script takes a number of arguments, including map extent, SR, visible layers, etc. (the script is actually the "Export PDF web application and GP service sample" from David Spriggs).

When I run this from ArcCatalog (as a tool) and enter some values, the tool runs and the PDF is created at my specified location on the local disk. However, when I access and run this very same task from my JSPAI application, it simply returns the error: "Error Submitting Job" (the error stack just points to the JSAPI - using v2.2).

I have setup a proxy and this seems to work fine (I get a 200 status) when submitting the task. The parameters are definitely correct, as I have written them to the console, then copied and pasted them in the tool dialog (via ArcCatalog) and the tool runs fine.

To test further, I used the SubmitJob page through the rest service directory. Again, I entered all the values and the results come back saying the task is complete. However, the PDF created is not located in the directory specified in the python script, but at some non-existent location (http://<server>/arcgisjobs/exportpdf_gpserver/j07d98f158f774503be941bcccedce974/scratch/Map_test6.pdf).

So, is it that the GP task ignores the file paths of the original script and uses a setting of its own to save the new file? If so, where is that setting? Or is that just a temp path used by the rest service interface? Or am I totally confused?

Any help or suggestions welcome.


P.S. It also might be worth noting that the GP error I get comes back very fast. When the tool runs successfully from arccatalog it can take up to a minute. So I am assuming the problem is "early" in the task (i.e. connection, variables, etc.) rather than in the task itself.