Logging Plugin Incompatibility
As of Codebeamer 2.1 (IMPALA), Codebeamer's logging capabilities were improved to be better able to trace executions happening inside plugin code. This is in place helping the support and developer staff to ensure the service quality of Codebeamer in case we need to obtain logs from our customers to investigate performance issues.
The logging augmentation of the code has a limitation, that it cannot work on Java classes marked as "final". Since customers can also add their own plugin code to the system, those are also in the scope of this requirement.
We are validating if all runtime customer code match this criteria.
In case a class which does not meet this criteria is found, a warning is
- Written to the Codebeamer log during startup:
2023-08-02 10:09:14,870 WARN codebeamer.context.CodebeamerApplicationInitializer - The following plugin classes are incompatible with server-side logging and will be not augmented: class com.intland.codebeamer.BadTrackerItemListener. Please modify these classes to be non-final. [RMI TCP Connection(4)-127.0.0.1] [34] {Req#=StartUp, Sess#=StartUp, serverId=server}
- And the following error message is displayed on the System Administrator page of Codebeamer:
The plugin code is still functional despite this, but the extra logging facilities are unable to augment these code paths.
How to fix?
Customers needs to manually fix and recompile their plugin classes in question. This can be as simple as removing the "final" designator on the Java class listed by the warning message seen above.
We provide two example classes to demonstrate the differences. Both write an example log message to the Codebeamer log when a new tracker item is created.
When the plugin code is correct, the log message has the "pluggableCode" attribute present with the full name of the plugin code being executed.
For BadTrackerItemListener, the following is an example of a sample log entry:
2023-08-02 10:10:22,611 INFO intland.codebeamer.BadTrackerItemListener - This is not logged in pluggable context. [catalina-exec-3] [40] {Req#=189, Sess#=063..94f, serverId=server}
For GoodTrackerItemListener, the following is an example of a sample log entry:
2023-08-02 10:10:32,391 INFO intland.codebeamer.GoodTrackerItemListener - This is logged in pluggable context. [catalina-exec-3] [40] {Req#=189, Sess#=063..94f, pluggableCode=eventListener:com.intland.codebeamer.GoodTrackerItemListener.trackerItemCreated, serverId=server}
Example Java Classes
For example Java classes, download the pluggable-logger-test.zip file.