Error: Coldfusion.runtime.UndefinedElementException: Element XXX is undefined in YYY

Error Message

The following exception occurs when a null value is returned by an element of an object:

"coldfusion.runtime.UndefinedElementException: Element XXX is undefined in YYY"


The Cold Fusion MX toolkit cannot handle NULL values.

Solution or Workaround

Use CFPARAM tag to solve this problem. Instructions for this procedure can be found through the link in Related Information, below.

The tag assigns a default value to a variable. If the value assigned to a variable by the Web service is not NULL, then that value gets displayed. However, if the value is NULL, then the default value for that variable, as set in the CFPARAM tag, is displayed.

CFPARAM Tag details:

This tag tests for a parameter’s existence, tests its data type, and, if a default value is not assigned, provides one.

name = "param_name"
type = "data_type"
default = "value">

Related Information