In 12c, Oracle XML Database (XDB) is a mandatory component and cannot be uninstalled. This is because there are many dependencies on XDB. The following database components / features rely on XDB to be installed and in a VALID state:
• Oracle Application Express (APEX)
• Oracle Expression Filter
• Oracle interMedia / Multimedia DICOM
• Oracle Multimedia Image metadata extraction of EXIF, ORDIMAGE, IPTC and XMP metadata
• Spatial (including Oracle Locator)
• Oracle Applications such as iRecruitment
• Any procedure using UTL_TCP, UTL_HTTP, UTL_SMTP
• XMLTYPE operations
• XBRL (Extensible Business Reporting Language) from 126.96.36.199 onwards
If the XDB component becomes invalid, this will cause the components above to become invalid as well. XDB can become invalid for different reasons, but a common culprit is the setting for the LD_LIBRARY_PATH / LIBPATH / SHLIB_PATH environment variable. This environment variable is used to resolve the location of the shared library "libxdb.so" (libxdb.sl on HP). If Oracle is not able to access that library, many different errors / symptoms can occur.
First, lets discuss which platform uses which environment variable:
Often times, the LD_LIBRARY_PATH environment variable is set for AIX. However, that setting will have no affect as AIX uses the LIBPATH environment variable. Keep this in mind if you are using AIX.
It is very important that the LD_LIBRARY_PATH / LIBPATH / SHLIB_PATH environment variable be set correctly. That is, the first directory referenced must be $ORACLE_HOME/lib. You can reference other paths in this setting, but they cannot be the first path.
If this environment variable is not set correctly when the instance is last started, you may receive one or more of the following errors when installing XDB, upgrading XDB, configuring APEX, running an Export, selecting from xdb.xdb$resource/sys.dba_network_acls, or using other XDB features:
• ORA-31159: XML DB is in an invalid state
• ORA-00600: internal error code, arguments: [unable to load XDB library]
• ORA-00600: internal error code, arguments: [qmx: no ref]
• ORA-00600: internal error code, arguments: [qmtGetColumnInfo1]
• ORA-00600: internal error code, arguments: [qmtb_init_len]
• ORA-00600: internal error code, arguments: [qmtGetBaseType]
• ORA-00600: internal error code, arguments: [psdnop-1], 
• ORA-00600: internal error code, arguments: [qmtInit1]
• ORA-07445: exception encountered: core dump [_memcpy()+224] [SIGSEGV] [Address not mapped to object]
• ORA-19051 Cannot use fast path insert for this XMLType table
• ORA-31011: XML parsing failed
• ORA-00600: internal error code, arguments: [qmtcolcb_nomatch], [ID], [annotation], , , , , , , , , 
Errors of this sort generally occur when the init routines for the internal XDB functions are run in an invalid environment, causing memory corruption.
Many failed upgrades happen because the LD_LIBRARY_PATH / LIBPATH / SHLIB_PATH environment variable is pointing to the wrong $ORACLE_HOME/lib directory rather than to the correct location for the instance, or it is not even set at all.
To check if the LD_LIBRARY_PATH / LIBPATH / SHLIB_PATH environment variable was set correctly during the last database startup, run the following OS commands:
Determine the pid of the smon process:
% ps -ef | grep smon
Get the environment of the smon process:
% pargs -e <pid from above> -- Solaris
% ps eauwww <pid from above> -- Linux and AIX
See the following document for more information:
(Doc ID 373303.1) How to Check the Environment Variables for an Oracle Process
If you find that the LD_LIBRARY_PATH / LIBPATH / SHLIB_PATH environment variable is not set or is not set correctly, do the following:
1. Shutdown the database
2. Set LD_LIBRARY_PATH (LIBPATH for AIX or SHLIB_PATH for HP) as follows:
csh: setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:<other paths>
ksh: export LD_LIBRARY_PATH=$ORACLE_HOME/lib:<other paths>
3. On AIX only, run /usr/sbin/slibclean as root to remove any currently unused modules in the kernel and library memory.
4. Restart the database.
If you are using RAC and startup the database with the SVRCTL command, see the document below:
(Doc ID 733567.1) Setting Environment Variables Through Srvctl
We hope this information is helpful. For more information on the installation of XDB and best practices, see the following document:
(Doc ID 1292089.1) Master Note for Oracle XML Database (XDB) Install / Deinstall