geoprocessor hangs

468
2
04-04-2014 03:28 PM
KevinNetherton
New Contributor II
I'm using Java with arcobjects.  Prints "Trying to create a gp object...", but never gets to "..Done!".  Any suggestions?  Have lots of other arcobjects code that works.  For some reason can't get this one line to work!  Its a drag as its kinda an important one!

...
public createGp() {
  try{
   dealWithLics();
   System.out.println("Trying to create a gp object...");
   GeoProcessor gp = new GeoProcessor();
   System.out.println("..Done!");
  } catch (Exception e) {
   e.printStackTrace();
  }
}
...
0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
Kevin,

Never programmed in java so not sure what I'm going to write is relevant but in VB I would have done the following....

Dim pGp as IGeoProcessor
pGP = New GeoProcessor

Note I do not have any () after the Class and I had to import ESRI.ArcGIS.Geoprocessing for it to work.
0 Kudos
KevinYanuk
Occasional Contributor
I'm using Java with arcobjects.  Prints "Trying to create a gp object...", but never gets to "..Done!".  Any suggestions?  Have lots of other arcobjects code that works.  For some reason can't get this one line to work!  Its a drag as its kinda an important one!

...
public createGp() {
  try{
   dealWithLics();
   System.out.println("Trying to create a gp object...");
   GeoProcessor gp = new GeoProcessor();
   System.out.println("..Done!");
  } catch (Exception e) {
   e.printStackTrace();
  }
}
...



I often avoid the GeoProcessor object at all costs, and stick to pure ArcObjects.  I've had issues with it in the past where it does the same thing randomly.  What are you doing with the GeoProcessor object?
0 Kudos