Custom task in ArcGIS Server 9.2 (Java Edition)

5 views
Skip to first unread message

kruisje

unread,
Jun 18, 2008, 5:23:02 AM6/18/08
to New England ArcGIS Server User Group
Hi,

I'm having a little trouble working with Custom Tasks in ArcGIS
Server. I've gotten to the point where I can add a custom task to the
interface. Now, suppose I put a command button on that task by
creating this method:


public void locate (TaskEvent event){}

And I create, in the same Java package as the custom task's class, a
class defined by this code:

public class foo
{
public foo()
{
System.out.println("foo object created");
}
}

I then proceed by implementing the locate() command of the task as
follows:

public void locate(TaskEvent event)
{
System.out.println("Test 1");
String s = new String();
System.out.println("Test 2");
Foo foo = new Foo();
System.out.println("Test 3");
}

Now, when I click the locate button in the ArcGIS Server Web Mapping
Application, the text output is:

Test 1
Test 2

Thus, the String object gets created without any problems, whereas the
method exection locks up on the creation of the Foo object. I've tried
putting a try{ ... } catch(Exception e)
{System.out.println(e.getMessage());} around the code, without any
results.

Does anyone have any idea why I'm not able to create objects from
custom classes within a custom task?
Reply all
Reply to author
Forward
0 new messages