Debugging Tips
Hints and tips on the usage of the JAddin framework

Common Error Messages

Error Message
Possible Reason
RunJava: Can't find class AddinName lotus/notes/addins/jaddin/AddinName in the classpath. Class names are case-sensitive.
The RunJava task was unable to load the class. Make sure that it is written with exact upper and lower case characters and it can be found by the RunJava class loader
JAddin: Unable to load Java class AddinName
The JAddin framework was unable to load the application class. Make sure that it is written with exact upper and lower case characters.
RunJava: Can't find stopAddin method for class AddinName.
The application class must be loaded thru the JAddin framework and not directly from RunJava. Use the command Load RunJava JAddin AddinName to start your application.
RunJava JVM: java.lang.NoClassDefFoundError: AddinName (wrong name: addinname)
The user class name in the command and the internal name do not match. Most likely you have not typed the name with correct upper and lower case characters.
Out of memory
All Java add-ins execute in a single Java Virtual Machine (JVM) in RunJava. The Domino Notes.Ini parameter JavaMaxHeapSize=xxxxMB may be used to increase the heap space.

HCL Domino Statistics

During execution, the JAddin maintains statistics and status information. They can be displayed with the Show Stat AddinName command:
1
> Show Stat HelloWorld
2
HelloWorld.Domino.Version = Release 10.0.1|November 29, 2018 (Windows/64)
3
HelloWorld.Domino.Platform = 6.2 (Windows 8)
4
HelloWorld.JAddin.StartedTime = 2019-02-03T08:31:47Z
5
HelloWorld.JAddin.VersionDate = 2019-02-03
6
HelloWorld.JAddin.VersionNumber = 2.1.0
7
HelloWorld.JVM.GCCount = 0
8
HelloWorld.JVM.HeapLimitKB = 131'072
9
HelloWorld.JVM.HeapUsedKB = 20'489
10
HelloWorld.JVM.Version = 1.8.0_181 (IBM Corporation)
Copied!

Console Help Command

The framework supports a number of special commands:
1
> Tell HelloWorld Help!
2
03.02.2019 09:34:28 JAddin: Quit! Terminate the add-in thru the framework
3
03.02.2019 09:34:28 JAddin: GC! Executes the Java Virtual Machine garbage collector
4
03.02.2019 09:34:28 JAddin: Debug! Enable the debug logging to the console
5
03.02.2019 09:34:28 JAddin: NoDebug! Disable the debug logging to the console
6
03.02.2019 09:34:28 JAddin: Heartbeat! Manually start heartbeat processing (automatically done every 15 seconds)
7
03.02.2019 09:34:28 JAddin: Help! Displays this help text
Copied!

Debugging

For a detailed problem determination, you may use the built-in debugging features.

Enable/Disable Debug

Domino Console Command
Description
Load RunJava JAddin AddinName Debug!
Start add-in in debug mode
Tell AddinName Debug!
Start the debug mode while the add-in is running
Tell AddinName NoDebug!
Stop the debug mode while the add-in is running
While active debugging adds a significant amount of data to the console log and to the log.nsf database, it can be helpful in finding the root of a problem.

Debug Output

The debug output is written to the HCL Domino console and includes the name of the Java method with the source line number issuing the message.
1
> Load RunJava JAddin HelloWorld Debug!
2
03.02.2019 09:36:12 JVM: Java Virtual Machine initialized.
3
03.02.2019 09:36:12 RunJava: Started JAddin Java task.
4
03.02.2019 09:36:12 JAddin: Debug logging enabled - Enter 'Tell HelloWorld NoDebug!' to disable
5
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(147) JAddin framework version 2.1.0
6
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(148) HelloWorld will be called with parameters null
7
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(151) Creating the Domino message queue
8
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(169) Opening the Domino message queue
9
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(187) Loading the user Java class HelloWorld
10
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(199) User Java class HelloWorld successfully loaded
11
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(211) => HelloWorld.addinInitialize()
12
03.02.2019 09:36:12 DEBUG: HelloWorld.addinInitialize(80) -- addinInitialize()
13
03.02.2019 09:36:12 DEBUG: HelloWorld.addinInitialize(94) Creating the Domino session
14
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(213) <= HelloWorld.addinInitialize()
15
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(224) => HelloWorld.start()
16
03.02.2019 09:36:12 DEBUG: JAddin.runNotes(226) <= HelloWorld.start()
17
03.02.2019 09:36:12 DEBUG: HelloWorld.runNotes(117) -- runNotes()
18
03.02.2019 09:36:12 DEBUG: HelloWorld.runNotes(130) => HelloWorld.addinStart()
19
03.02.2019 09:36:12 HelloWorld: Started with parameters null
20
03.02.2019 09:36:12 HelloWorld: Running on Release 10.0.1 November 29, 2018
21
03.02.2019 09:36:12 HelloWorld: User code is executing...
22
> Tell HelloWorld Q
23
03.02.2019 09:36:27 HelloWorld: User code is executing...
24
03.02.2019 09:36:27 DEBUG: JAddin.getCommand(622) User entered Quit, Exit or Domino shutdown is in progress
25
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(273) JAddin termination in progress
26
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(277) => HelloWorld.addinStop()
27
03.02.2019 09:36:27 HelloWorld: Termination in progress
28
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(279) <= HelloWorld.addinStop()
29
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(290) => JAddinThread.addinTerminate()
30
03.02.2019 09:36:27 DEBUG: HelloWorld.addinTerminate(158) -- addinTerminate()
31
03.02.2019 09:36:27 DEBUG: HelloWorld.addinCleanup(190) -- addinCleanup()
32
03.02.2019 09:36:27 DEBUG: JAddin.sendQuitCommand(649) Sending Quit command to Domino message queue
33
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(292) <= JAddinThread.addinTerminate()
34
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(303) Sending interrupt to HelloWorld
35
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(308) Waiting for HelloWorld termination
36
03.02.2019 09:36:27 DEBUG: JAddin.runNotes(313) HelloWorld has terminated
37
03.02.2019 09:36:27 DEBUG: JAddin.jAddinCleanup(751) -- jAddinCleanup()
38
03.02.2019 09:36:27 DEBUG: JAddin.jAddinCleanup(775) Freeing the Domino resources
39
03.02.2019 09:36:28 DEBUG: JAddin.finalize(798) -- finalize()
40
03.02.2019 09:36:28 RunJava: Finalized JAddin Java task.
41
03.02.2019 09:36:29 RunJava shutdown.
Copied!

Frequently Asked Questions

Q: How do I develop my JAddin project in Eclipse? A: Make sure you include the two JAddin framework class files and the notes.jar file (installed with HCL Notes or HCL Domino) as external files in your Eclipse project.
Q: What is the heartbeart in JAddin? A: The main thread in JAddin gets triggered every 15 seconds to perform some internal housekeeping tasks. One of these checks makes sure that the Java heap space does not get filled up to avoid out-of-memory errors. If the free space falls below 10 percent, the Java virtual machine garbage collector is invoked and a message is written to the console (see Notes.ini parameter JavaMaxHeapSize).
Q: I have copied a new version of my add-in to the server, but it does not get active during application startup. A: The RunJava task caches the Java classes in use. You must terminate all other RunJava tasks - and therefore terminate RunJava itself - to be able to force the reloading of your class file.
Last modified 10mo ago