question

anadgoud avatar image
anadgoud asked anadgoud posted

exception while "tclInterpreter.execute("package require AgtClient");"

Hi All,

 

I am trying to do following in the OpenRequestHandler

 

ITclInterpreter tclInterpreter = getTclInterpreter(model);

try {

// Load the required Network package in TCL.

tclInterpreter.execute("package require AgtClient");

// Tell the model that the session is now open (all initialization is complete).

((SessionModel) model).setOpen();

} catch (InterpreterException e) {

throw new ToolException("Error executing command in Tcl interpreter", e);

}

}

 

 

I am getting exception on tclInterpreter.execute can any one help me with this.

 

This how my getTclInterpreter looks like

 

 

protected ITclInterpreter getTclInterpreter(ISessionModel model) throws ToolException {

// Request the tool to see if anybody is providing ITclInterpreter service.

// If we can't find one, this tool cannot operate in that environment.

Object adapter = model.getContext().getAdapter(ITclInterpreter.class);

if (!(adapter instanceof ITclInterpreter)) {

throw new ToolException("Cannot find a Tcl Interpreter");

}

return (ITclInterpreter) adapter;

}

 

iTestsdk
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AdamB avatar image
AdamB answered AdamB posted

Hi anadgoud,

 

Information about the exception that you are seeing would be very helpful here.  In particular the message from the exception.  This will help us figure out what is causing the problem.

 

 

-a

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AmeyaB avatar image
AmeyaB answered AmeyaB posted

Can you ensure that the Agilent library is in the TCLLIBPATH environment variable? Once you have set the variable, you will need to re-start Eclipse for the variable to be loaded.

 

Could you also describe what exception you are getting? A stack trace will help.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.