Skip to main content

Configuration Warnings

A configuration warning is a non-fatal warning message attached to a Frank configuration element. It lets you flag a situation during configuration loading without preventing the configuration from starting.

Use the <ConfigWarning> element to add such a warning in Configuration.xml. The warning text is the element body, and the optional active attribute determines whether the warning is emitted.

Framework Warnings​

The Frank!Framework may throw warnings when deprecated attributes are used or when unsafe attributes are used.

These framework-generated warnings can be suppressed with dedicated properties. Each suppress key can be set to true on a specific configuration (as a configuration property) to suppress the corresponding warnings for that configuration. Some keys may also be set globally (for example in DeploymentSpecifics.properties or as a Java system property) to suppress the warning for all configurations; keys that are not globally suppressible can only be suppressed per configuration, to prevent important warnings from being hidden application-wide.

Property (Suppress Key)SuppressesGlobal Suppression Allowed
warnings.suppress.sqlInjectionsWarnings about attributes or settings that could make the configuration vulnerable to SQL injectionNo
warnings.suppress.transactionWarnings about transaction handling issuesNo
warnings.suppress.deprecatedWarnings about the use of deprecated elements and attributesYes
warnings.suppress.defaultvalueWarnings about attributes that are explicitly set to their default valueYes
warnings.suppress.integrityCheckWarnings about missing message-log / integrity-check configurationYes
warnings.suppress.resultSetHoldabilityWarnings about JDBC result set holdabilityYes
warnings.suppress.configurations.validationWarnings raised during configuration validationYes
warnings.suppress.flow.generationWarnings about errors during flow-diagram generationYes
warnings.suppress.multiPasswordKeystoreWarnings about keystores that use multiple passwordsYes
warnings.suppress.xslt.streamingWarnings related to XSLT streamingYes
warnings.suppress.xsd.warningXSD validation warningsYes
warnings.suppress.xsd.errorXSD validation errors reported as configuration warningsYes
warnings.suppress.xsd.fatalErrorXSD validation fatal errors reported as configuration warningsYes
warnings.suppress.unsafeAttributeWarnings about the use of unsafe attributesYes

For example, to suppress deprecation warnings for a single configuration, add the following to that configuration's properties:

warnings.suppress.deprecated=true
note

Not every configuration warning is suppressable.

caution

Suppressing warnings hides potentially important information about your configuration. Only suppress a warning after you have verified that the underlying situation is acceptable, and prefer suppressing per configuration rather than globally.

Adding Your Own Configuration Warnings​

Add a <ConfigWarning> child element at the place in Configuration.xml where you want the warning to belong. Put the warning message in the element body and use active to control when it appears. When the active attribute evaluates to true, the warning is added to the configuration warnings collected during startup. When it evaluates to false, the warning is ignored.

<ConfigWarning active="${= StringUtils.isEmpty(remote.url) }">
Adapter 'MyAdapter' is disabled because property 'remote.url' is empty
</ConfigWarning>
<Adapter name="MyAdapter" active="${= StringUtils.isNotEmpty(remote.url) }">
<Receiver>
<ApiListener name="listener" uriPattern="my-service"/>
</Receiver>
<Pipeline>
<EchoPipe name="done"/>
</Pipeline>
</Adapter>

This is useful when a configuration is intentionally optional, partially enabled, or depends on environment-specific properties. For expression syntax in active, see Properties.

Best Practices​

  • Use warnings for situations that should be visible but should not stop startup. Think of missing required properties, or advising against a certain property.
  • Make the message explain what is wrong and what the effect is.
  • Keep the warning close to the element it applies to. You can nest it almost everywhere directly in the configuration xml.
  • Use active to avoid showing the warning when the situation does not apply, see JEXL expressions.