Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8732223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:23:56+00:00 2026-06-13T09:23:56+00:00

Since Notes/Domino version 7 I have used the principles in Bob Balaban’s Two headed

  • 0

Since Notes/Domino version 7 I have used the principles in Bob Balaban’s “Two headed beast” (http://bobzblog.com/tuxedoguy.nsf/dx/the-2-headed-beast-debugging-domino-java-agents-with-eclipse) for writing Java agents in Eclipse that can be debugged! This works like a charm – the only thing is that I have had to copy/paste the code from Eclipse to the standard Notes agent.

With the current Eclipse version (8.5.3 FP2) of Domino Designer I tried to see if I could use the same setup to debug agents directly (as Java programs) in Domino Designer. It seems that I can make the code run, however, I cannot make it stop at any breakpoints. The message I get is:

Unable to install breakpoint in dk.domain.AgentTemplate due to missing line number attributes. Modify the compiler options to generate line number attributes.

I have tried to set the debug configuration to “Stop in main”. And it does seem to stop. However, if I step over, it runs all of the code – and I cannot see where in the code I am, and of course I cannot see the variables nor their values.

The option in Preferences – Java – Compiler to “Add line number attributes to generated class files” has been selected. I have not found other compiler option to generate line numbers.

I am using Java 1.5 compliance in Designer.

Has anyone been able to set this up??

/John

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:23:57+00:00Added an answer on June 13, 2026 at 9:23 am

    Well, sometimes you just have to explain your problem to find the solution.

    In thoroughly describing the problem, I ended up trying to use a JDK 1.6 compiler compliance level (under preferences – Java compiler). And that actually worked!!!

    So building an agent with a structure like this you can debug Java agents directly in Domino Designer:

    package dk.dalsgaarddata;
    
    import lotus.domino.AgentBase;
    import lotus.domino.AgentContext;
    import lotus.domino.Database;
    import lotus.domino.DocumentCollection;
    import lotus.domino.NotesException;
    import lotus.domino.NotesFactory;
    import lotus.domino.NotesThread;
    import lotus.domino.Session;
    import dk.dalsgaarddata.debug.DebugAgentContext;
    
    /*  ------------------------------------------------------------------------------------
        Created: 2009.04.21/Jda
        Revised: 2009.04.29/Jda - v.1.1
    
        Agent template.... 
        ------------------------------------------------------------------------------------ */
    
    public class AgentTemplate extends AgentBase {
        // DEBUG: For Eclipse debugging - see main method at the end of this class.
    
        // Beginning of "ordinary" Lotus Notes/Domino Agent....
        private Session mySession = null;
        private AgentContext myContext = null;
        private DD_BackendLog myLog = null;
    
        private void cleanUp() {
            try {
                if (null != myLog)
                    myLog.end();
                if (null != mySession)
                    mySession.recycle();
            } catch (NotesException ne) {
                System.err.println("Error cleaning up log and Session.");
            }
        }
    
        // Lotus Notes/Domino entry point...
        public void NotesMain() {
            try {
                if (mySession == null) {
                    mySession = getSession();
                    myContext = mySession.getAgentContext();
                }
                SessionContext.getInstance(mySession, myContext);
                myLog = SessionContext.getLog();
    
                System.out.println("NotesMain Started....");
                // Your code goes here....
    
                myLog.information(".... completed!");
            } catch (NotesException ne) {
                myLog.error("Agent ERROR: NotesException = " + ne.text);
                myLog.writeStackTrace(ne);
            } catch (Exception e) {
                myLog.error("Agent ERROR: Exception = " + e.getMessage());
                myLog.writeStackTrace(e);
            } finally {
                cleanUp();
            }
        }
    
        /*  Instructions for debugging!!
        // TODO - adjust run configuration
            You need to add VM arguments, e.g.:
    
                -Dsun.boot.library.path="c:\\Lotus\\Notes;c:\\Lotus\\Notes\\jvm\\bin"
    
         ... and you need to add a PATH environment variable, e.g.:
    
                PATH    c:\Lotus\Notes
        */
    
        // Remember to rename these constructors when duplicating this code to a new agent!!!
        // ... if not handled by Eclipse when pasting a copy ;-)
        public AgentTemplate() {
        }
    
        public AgentTemplate(Session s, AgentContext c) {
            this.mySession = s;
            this.myContext = c;
        }
    
        // Entry point for Java program (when running from Eclipse)
        public static void main(String[] args) {
            // By example from Bob Balaban "The two-headed beast". See more at:
            // http://www.bobzblog.com/tuxedoguy.nsf/dx/DominoAgents-Eclipse_v2.pdf/$file/DominoAgents-Eclipse_v2.pdf
            System.out.println("main Starting....");
            Session s = null;
            Database d = null;
            DocumentCollection dc = null;
            AgentContext ctx = null;
    
            System.out.println("NotesThread.sinitThread()....");
            NotesThread.sinitThread();
            try {
                System.out.println("createSession....");
                s = NotesFactory.createSession();
                System.out.println("set database....");
                d = s.getDatabase(DebugAgentContext.ECLIPSE_SERVER, DebugAgentContext.ECLIPSE_DATABASE);
                System.out.println("Database: " + d.getFileName() + " on " + d.getServer());
                System.out.println("set debug context....");
                ctx = new DebugAgentContext(s, d, dc);
                // Create the agent object, invoke it on NotesMain(), the way Domino does
                System.out.println("create agent object....");
                AgentTemplate agent = new AgentTemplate(s, ctx);
                System.out.println("call agent....");
                agent.NotesMain();
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                try {
                    if (s != null)
                        s.recycle();
                } catch (Exception x) {
                }
                NotesThread.stermThread();
            }
        } // end main - and Eclipse entry point
    
    }
    

    I have left my “print” commands in the code for easier testing. Obviously, you would remove them from your real template.

    Another thing that may have contributed to getting this to work is that I changed the case of the configuration parameters to match exactly the same upper/lower case as the directories are on the disk.

    /John

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't used rails since version 1.2 or so and a few things have
I have been looking at the Kinect for Windows release notes and features, since
Since now I have only used plugin for editing and the way I use
I have a column with some notes displaying in the rows. Since the notes
I have a custom template that is deployed on Domino servers and used by
I have an AdvancedDataGrid structured as a tree. Since the non-leaf nodes have an
I have created a LaTeX \todo{} command which outputs todo notes in the margin:
I am doing traditional lotus notes programming (same since R5) and need to implement
Since it's a long question, cliff notes come first. Cliff notes: One client sends
I really have some troubles since 1 week ago. I got errors like this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.