There is a separate class loader for each code module, so under standard Java class loading rules that means classes loaded from one code module are isolated from classes loaded from another. Therefore if you place log4j (for example) in two code modules there won't be any "co-operation" between the log4j classes loaded from different code modules, because there is no shared state between them.
The solutions to this are:
- place all your handlers in one code module (along with the one copy of log4j).
- put the commonly used classes (eg: log4j) in a shared library or on the classpath of the application server.
- use libraries that are provided by the application server or Java runtime (eg: JUL).
------------------------------
Mike
------------------------------
Original Message:
Sent: Fri July 11, 2025 10:32 AM
From: Kiran Aithagani
Subject: JUL Logging for FileNet Custom Event Action Handler
We have 9-10 code modules and we have the same problem, multiple lock files and some times the log entry appears in multiple logs as well with JUL logging method,, its not great way but not bad to fish for right code module logs, but happy to know if there is a better way. we thought of using log4j but there are couple of challenges
- a common place where we can upload that log4j libraries so it is visible to all code modules(event handlers), otherwise the libraries have to be bundled with each code module jar
- yet have a separate log name generated for each code module and log the information in that file
- when these code modules are loaded how the CPE class loader is going to handle is as each code module will have its own same exact set of log4j classes bundled
Thanks
Kiran Aithagani
------------------------------
Kiran Aithagani
Original Message:
Sent: Wed July 09, 2025 12:20 PM
From: Kenny Dick
Subject: JUL Logging for FileNet Custom Event Action Handler
Hi Matthew
I didn't get any joy on this despite exhausting all avenues of support. We tried it but the behaviour was wild and caused issues like hanging the JVM so we scrapped it. Support couldn't help us find root cause. We ended up writing the logs to the WAS System Out and just use filtering to review log activity specific to our handlers. Not ideal but we decided we didn't really need things to be separate like with log4j.
Regards, Kenny
------------------------------
Kenny Dick
Original Message:
Sent: Tue July 08, 2025 08:07 PM
From: Matthew Clay
Subject: JUL Logging for FileNet Custom Event Action Handler
Kenny did you ever get a resolution to this?
------------------------------
Matthew Clay
Original Message:
Sent: Wed August 02, 2023 03:29 AM
From: Kenny Dick
Subject: JUL Logging for FileNet Custom Event Action Handler
Hey Everyone
I'm looking to connect with anyone who has successfully converted their custom event action code module to use the new JUL logging capability which replaced Log4j. During development, we're seeing some issues with formatting and multiple lock files per iteration of the event fired so could so with the some help from someone who has it working.
Thanks in advance, Kenny
------------------------------
Kenny Dick
------------------------------