These are known bugs for Oracle XML DB in Oracle Database 12c Release 2 (12.2).
When an Oracle Database 11g Release 2 (220.127.116.11) standby database without XDB installed is upgraded and supplemental logging is turned on, the upgrade to Oracle Database 12c fails. This is because, as part of the Oracle Database 12c upgrade, XDB is automatically installed. As part of the upgrade, some
registerSchema procedures fail and then cause the XDB component to be invalid.
event="1399 trace name context forever, level 512" prior to upgrading the standby database. This event disables supplemental log generation for procedures.