Oracle Error Message
ORA-19022: Unoptimized XML construct detected.
Reason for the Error
XMLOptimizationCheck is enabled and unrewritten XML construct was detected. This prevents execution of XML construct.
Solution
Make sure that XML construct is being optimized. See trace file for further information. Disable XMLOptimizationCheck if you want the unoptimized XML operation to be executed.