ARTIFACTORY: How to resolve the error "Invalid content was found starting with element"

ARTIFACTORY: How to resolve the error "Invalid content was found starting with element"

AuthorFullName__c
Pavan Gonugunta
articleNumber
000005230
ft:sourceType
Salesforce
FirstPublishedDate
2022-03-28T12:12:34Z
lastModifiedDate
2022-03-28
VersionNumber
4

This error “Invalid content was found starting with element” during the Artifactory startup usually means there is a mandatory parameter that is missing or there is an invalid parameter in artifactory.config.latest.xml file.

For example, the below error denotes cronExp parameter is missing in artifactory.config.latest.xml
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://artifactory.jfrog.org/xsd/3.1.2":retentionPeriodHours} '. One of '{"http://artifactory.jfrog.org/xsd/3.1.2":dir , "http://artifactory.jfrog.org/xsd/3.1.2":cronExp} ' is expected.

Looking at artifactory.config.latest.xml file we can observe the cronExp tag is missing for one of the configuration fields. In the below case cronExp missing on the backup config: