GP service: ERROR 000816: The tool is not valid.

3376
6
07-14-2016 08:37 AM
springzhang
New Contributor II

I have successfully published a custom GP service from ArcMap. The GP tool is in C#.  The built DLL was registered in both ArcGIS desktop and server through ESRIRegAsm.  The tool run well in ArcMap. But when i run the service, I got the error "Error executing tool.: ERROR 000816: The tool is not valid." Any idea why?

My ArcGIS server version is 10.4.5524

Desktop version is 10.4.5524

.Net framework version is 4.5.1

PS: I also navigated to the directory on Server: C:\arcgisserver\directories\arcgissystem\arcgisinput\{my service name}.GPServer\extracted\v101..., and run the tool there in ArcMap, it run well.

0 Kudos
6 Replies
LukeCatania
New Contributor III

Did you ever find a solution?  I have this issue in Runtime for Java.  A simple Extract By Mask Tool works on Desktop, but gives the error in runtime.

0 Kudos
springzhang
New Contributor II

Sorry for the late reply.

My problem was caused by the wrong input types. In my codes, one of the gp parameters was set to be GPLong, but it was used as String in the implementation part. After I changed the type from GPLong to GPString, the error disappeared. It seems that ArcServer is more strict with the parameter types.

Hope it helps you.

0 Kudos
Robert_LeClair
Esri Notable Contributor

Do you have any Business Analyst GP tools in your GP service?  If so, they will throw this error.

0 Kudos
springzhang
New Contributor II

Actually no. 

I have already fixed the problem. Thanks!

0 Kudos
FreddieGibson
Occasional Contributor III

Could you upload the source code for your GPFunction? Also, when you say you registered it with the server did you use the 64 bit esriregasm?

0 Kudos
springzhang
New Contributor II

Thanks, I have already fixed the problem

0 Kudos