Custom Geoprocessing tool crashes

1380
1
Jump to solution
09-06-2013 05:29 AM
by Anonymous User
Not applicable
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.

Doug
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: dougjc

I've managed to figure this out with a bit of trial and error.

Its all down to the ArcGIS debugging tools available in the JavaConfigTool. In particular the "Create Console" option, with my setup when I have this checked and I try and run any custom geoprocessing tool (even something straight out of the wizard) the whole thing crashes. But once you disable it the geoprocessing tool runs fine.

Going to try and raise this as a defect with ESRI.

View solution in original post

0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: dougjc

I've managed to figure this out with a bit of trial and error.

Its all down to the ArcGIS debugging tools available in the JavaConfigTool. In particular the "Create Console" option, with my setup when I have this checked and I try and run any custom geoprocessing tool (even something straight out of the wizard) the whole thing crashes. But once you disable it the geoprocessing tool runs fine.

Going to try and raise this as a defect with ESRI.
0 Kudos