• AgentContext.getCurrentAgent() throws UndefinedDelegateTypeException

    By Scott Blaylock 10 years ago

    I have an agent where I'm trying to get the parameterDocID, but the getCurrentAgent() call is throwing an error:

    Slice of Code:

    import org.openntf.domino.*;

    Session session = getSession();
    AgentContext agentContext = session.getAgentContext();
    Database db = session.getCurrentDatabase();
    Agent thisAgent = agentContext.getCurrentAgent();

    Error:

    org.openntf.domino.exceptions.UndefinedDelegateTypeException
    org.openntf.domino.utils.Factory.getParentDatabase(Factory.java:511)
    org.openntf.domino.impl.Agent.(Agent.java:41)
    org.openntf.domino.utils.Factory.fromLotus(Factory.java:165)
    org.openntf.domino.impl.AgentContext.getCurrentAgent(AgentContext.java:55)
    JavaAgent.NotesMain(JavaAgent.java:13)
    lotus.domino.AgentBase.runNotes(Unknown Source)
    lotus.domino.NotesThread.run(Unknown Source)

    If I change the import to lotus.domino.* it works fine.

    I'm running M4.5 on a Domino 9.0.1 Server.

    Thanks,
    Scott.

    • By Scott Blaylock 10 years ago

      I found a link to a newer version of the org.openntf.domino.jar file on stackoverflow, which has the fix.

      Scott.