error submitting GP job

343
2
06-07-2012 06:21 AM
Town_ofSnowflake
Occasional Contributor
I've built a web application that uses a GP service to extracts data (using a modification of the Clip and Slip) using the ArcGIS for Javascript API.  The GP service works via URL and within ArcGIS Desktop.  When I try to submit a job through the application, a single GET request is made to my server and I get the error: "Error submitting job..... code 500."  I'm using HTTPFox to watch the traffic between browser/server.  Note: I'm submitting the required parameters and I believe I am referencing the correct URL to the GP service  "<servername>/ArcGIS/rest/services/GPServer/<toolname>"
0 Kudos
2 Replies
HemingZhu
Occasional Contributor III
I've built a web application that uses a GP service to extracts data (using a modification of the Clip and Slip) using the ArcGIS for Javascript API.  The GP service works via URL and within ArcGIS Desktop.  When I try to submit a job through the application, a single GET request is made to my server and I get the error: "Error submitting job..... code 500."  I'm using HTTPFox to watch the traffic between browser/server.  Note: I'm submitting the required parameters and I believe I am referencing the correct URL to the GP service  "<servername>/ArcGIS/rest/services/GPServer/<toolname>"


Melo, the error message "Error submitting job..... code 500" is too generic to figure out exact where the gp went wrong except that this is a Server issue (again it could be web server or ags server issue). What you usually want to do it testing your gp tool on desktop environment, then publish on the server...
0 Kudos
Town_ofSnowflake
Occasional Contributor
Thanks for the response.

This problem was solved using URL debugging / HTTPFox

I submitted the job through "<servername>/ArcGIS/rest/services/GPServer/<toolname>/submitJob" and compared the URL string to the one being sent directly from within the application.

I had an optional parameters in the GP tool that I was not declaring in the parameters sent to the job from within the application. However, the job sent from "<servername>/ArcGIS/rest/services/GPServer/<toolname>/submitJob" included the optional parameter in the string that was sent to the GIS server.

I solved the issue by including the optional parameter in the parameter list with empty quotes: var params = {optionalParameter = ""....}
0 Kudos