Null AgentContext in java agent - help please!

Hi there.

I have a notes agent which is called via lotusscript from a form :

Call agent.Run(doc.NoteID)

The agent is a java agent which works for all who have tried it so far apart from the customer (ain’t that always the way?) I have debugged through it and it doesn’t get very far. I try to set up the agentContext using :

this.sess = getSession();

this.agentContext = this.sess.getAgentContext();

and for some reason for him it seems to be returning null, so when I try to do my next line :

this.agentName = this.agentContext.getCurrentAgent().getName();

it gives me a NullPointerException error back :

<<<<< E R R O R >>>>>:

05-19-05 01.57.58 PM EDT :

java.lang.NullPointerException

at JavaAgent.NotesMain(JavaAgent.java:106)

Can anyone give me any reasons why I’m unable to pick up agentContext for this guy?

Thanks in advance.

Ellie

Subject: Null AgentContext in java agent - help please!

Just a shot in the dark, but is your customer able to “kick-off” server agents? Under what name or security privileges does your customer have. Access rights, etc.

SPJ

Subject: RE: Null AgentContext in java agent - help please!

Sorry should have said. Customer is internal; I have tested with users with less access than him and it works fine so shouldn’t be an access issue. Agent is also set to allow restricted actions etc (level 3) yet really that should only be necessary for the file handling later on in the agent which hasn’t been reached by the time the code breaks for him :frowning:

Cheers,

Ellie