AnsweredAssumed Answered

Custom Geoprocessing tool crashes

Question asked by geonetadmin on Sep 6, 2013
Latest reply on Sep 20, 2013 by geonetadmin
Original User: dougjc

I'm trying to create a custom geoprocessing tool using the Java API in Eclipse, and I'm having a few difficulties.

My tool kept crashing, so I did some debugging and it never even hits the execute method, it crashes just after calling getDisplayName() but as I dont have the Arc source I cant see exactly whats going on. It looks like a String.toString() call on the result of the getDisplayName() method is the culprit. Which seems a bit of an odd place to break.

To confirm it wasnt anything obvious I'd done wrong I ran the wizard to create a new geoprocessing tool, and exported that without any changes to the generated code. It still crashes, which is why I'm now posting here because I cant figure it out at all.

To reproduce, I've attached the generated files and a jar of them (you will need to do some renaming). Either generate your own jar or copy to mine to somewhere like: C:\Program Files\ArcGIS\Desktop10.1\java\lib\ext

Then add TestTool from FunctionFactory1 into a toolbox and try and run it. For me it crashes with an ESRI error report dialog. I'm using ArcMap 10.1 and eclipse Helios SR2.