Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- For logging (mostly at debug level), the SOS API uses the SOSString.toString() method to log all properties of a given object.
- the SOSString.toString() method is based on the org.apache.commons.lang3.builder.ReflectionToStringBuilder implementation:
This class uses reflection to determine the fields to append. Because these fields are usually private, the class uses AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean) to change the visibility of the fields. This will fail under a security manager, unless the appropriate permissions are set up correctly.
- JDK17 known issue - https://issues.apache.org/jira/browse/LANG-1685
- the SOSString.toString() method is based on the org.apache.commons.lang3.builder.ReflectionToStringBuilder implementation:
Desired Behaviour
- SOS removes the use of ReflectionToStringBuilder from future releases and implements a replacement.
Test Instructions
- JOC-Cockpit Common tests:
- configure log4j.xml to use DEBUG log level
- set RootLogLevel, JocLogLevel, ..., ConnectionPoolLogLevel to DEBUG
- configure the Cleanup Service (Settings -> cleanup -> period_begin) to start in a few minutes
- execute arbitrary workflows
- check jetty.log and other log files for problems with SOSString.toString
- configure log4j.xml to use DEBUG log level
- Test with Java 11.
- Configure JOC-Cockpit to run with Java 17 and repeat the tests.