This section gives information about debugging the extension.
Under the directory where IBM Director is installed, there is a subdirectory named "log". This directory contains debug information in log files. There are several different types of logs
This file is created if the IBM Director server fails with a Java exception. Click herefor a sample view.
TWGRas.log is the log file for RAS logging. This file is useful because it wraps and will not fill up the disk.
There are three types of RAS log messages:
TWGRas messages might be displayed in two ways:
Using RAS creates more processing overhead, consequently performance might be affected. To minimize the overhead of your debug logging, wrap each call to TWGRas.debug inside of a twg for the boolean for that trace flag. It will look something like this:
if (TWGRas.isTraceEX0) TWGRas.debug(TWGRas.EX0,"This code only runs when tracing is ON");
Note: A check for this condition should be wrapped around each log method, so that you enable and disable RAS dynamically during the execution of your extension. You should not check if debug is enabled only once during the lifetime of your extension because this will prevent you from dynamically activating and deactivating RAS output with RasWatch.
To turn on RAs logging, go to the data directory and edit the twgras.properties file. Modify the file as shown in the following diagram:
Additionally, on Windows platforms, the raswatch program will dynamically turn on RAS flags. For help with raswatch, use the command:
raswatch -?
The STDOUT and STDERR output for an extension is captured by the
IBM Director Server. Normally, this output is discarded. When debugging, you can cause IBM Director to write the output messages to files in
the log directory.
The output logging must be turned on to see the data in the output logs. The procedure for turning on the output logging is different on Windows platforms and on Linux.
Use the Windows registry editor. Find the key:
HKEY_LOCALE_MACHINE\SOFTWARE\Tivoli\Director\CurrentVersion
Set the value of
LogDir to 1.
It will look like this:
Go to the IBM Director data directory. Edit the file TWGRas.properties. Uncomment the line for twg.sysout=1.
The file will look like this:
The output logs are written into the IBM Director log directory. The file names are determined as follows:
Use the following steps to attach a debugger to the IBM Director Server to debug your code:
The previous sections have described how to debug code that resides on the IBM Director Server; however, you might need to debug the user interface portion of your new task. Most of the facilities you have for debugging your extension server can be used to debug your extension code on a machine that has the IBM Director Console installed.
Like the IBM Director Server, the IBM Director Console does have the facility to capture STDOUT and STDERR and pipe it to a file. This is accomplished on Windows using the registry.
Now, using regedit.exe, modify the following server registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Tivoli\Director\User\[computer]\[userid]\MainGUIConsole.ConsolePrefs
[computer] is the computer or domain name entered before the
slash and the user ID on the IBM Director Console when logging onto the
IBM Director Server.
[userid] is the user ID entered after the slash on the IBM
Director Console when logging onto the IBM Director Server. The second
byte of this binary data controls the IBM Director Console's use of
native RAS support. The following values are used:
Changing the value from 00 to 01 allows you to use the RasWatch or RasDump without having to specify a different log file for your console code. You then start the console as you normally would from the program menu. You should now be able to view RAS messages you have logged from your extension's console code.
Problem | Possible causes |
The extension is not in the product information. | The extension file does not end in ".TWGExt:. The extension file is not located in the classes\extensions directory. The extension is in the product information panel but has the wrong NLS string. |
The IBM Director Server fails to start. | The IBM Director Server cannot find the extension class. - The classpath.append.x line does not point to the correct classname - The twg.extension.classname does not match the extension class name . The extension failed to initialize - One of the extension methods threw an exception |
The extension is in the product information but the string is wrong. | Problem with NLs bundle lookup - The bundle classname was not found. - the value of twg.extension.name does not make the key in the NLS Resource Bundle. |
Problem | Possible Causes |
Task is not displayed on the Director Console | There was an exception during the pocessing of new TWGDefaultTask(); Make sure that you catch and log the information in the TWGTaskCreationException. |