Closed psavidis closed 1 year ago
TODO
: Add Fix to 7.20
once respective Release Process branch is created.
Update:
The solution passes all AS integration Tests besides WebLogic. Last run that failed can be found here.
The exact reason that the WebLogic ITs fail is not identified.
Hints for troubleshooting:
boxed-properties-config.xml
adds a new engine called boxed-config-engine
for the different AS & used by the test TestConfigParsing
that covers historyCleanupDefaultNumberOfRetries
parsing.null
, cannot be found.boxed-config-engine
reference cannot be found in any WLS log file as if the engine is not registered at allThe above issue stands as an obstacle at the moment for moving forward. Also, the new implementation will require extra testing for ALL the possible config scenarios.
In this regard, the decision is to move forward with simply using an int
type for historyCleanupDefaultNumberOfRetries
and use a default value of Integer.MIN_VALUE
and adapt the implementation (see HistoryCleanupHelper#getMaxRetries
) accordingly.
@psavidis, the code looks good 👍
🔧 Please add the correct version labels, DRI, and reviewer before you merge.
Environment (Required on creation)
Tomcat Distrubution of :
7.19.7-ee
,7.20.0
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)
The newly added flag
historyCleanupDefaultNumberOfRetries
which controls the customisation of retries for cleanup jobs separately, once configured from a tomcat xml configuration file makes the engine startup to fail.Steps to reproduce (Required on creation)
camunda-bpm-platform/distro/tomcat/assembly/src/conf/bpm-platform.xml
After the property
historyCleanupBatchWindowStartTime
, copy paste the following indicative config:<property name="historyCleanupDefaultNumberOfRetries">5</property>
(The above config is only indicative, any int value will do)start-camunda.sh
(or.bat
) to start tomcatObserved Behavior (Required on creation)
Open
camunda-bpm-platform/distro/tomcat/distro/target/camunda-bpm-tomcat-7.xx-SNAPSHOT/server/apache-tomcat-9.0.75/logs/catalina.out
; Notice the stacktrace failing with the respective message thathistoryCleanupDefaultNumberOfRetries
cannot be initialised.Expected behavior (Required on creation)
The application should startup and the
ProcessEngineConfiguration
should be populated with the respective value (in the indicative example the value should be 5)Root Cause (Required on prioritization)
org.camunda.bpm.container.impl.metadata.PropertyHelper#convertToClass
supports only primitive types. Thus, the type ofhistoryCleanupDefaultNumberOfRetries
fetched from the reflection code of the method isjava.lang.Integer
, not matching with any of the primitive types of the current conditionals and the output type is determined to bejava.lang.String
.Solution Ideas
Make
org.camunda.bpm.container.impl.metadata.PropertyHelper.convertToClass
supportjava.lang.Integer
autoboxing type.Likewise, the rest of the conditionals can be complemented with their respective autoboxing types
Long
,Float
,Boolean
.The primitive type conditionals can be extended with
Double
, just in case any other configuration with these types might be added in the future & avoid fixing the same problem again.byte
,short
,char
primitive types can be excluded since: a) First one is not likely to be ever exposed for config purposes b) Short is already covered byint
c) Character can cause config-confusion withString
. AlsoString
can cover characters too & the likelihood of using a char in configuration is low.Hints
Links
Breakdown
Dev2QA handover