Oracle Solution for Error ora-30381

Solution for Oracle Error ORA-30381

ORA-30381: REWRITE_TABLE is not compatible with Oracle version

What triggered the Error:

One or more column definitions in the REWRITE_TABLE is either missing or incompatible with the current Oracle version.

What should we do to fix it:

Connect to the appropriate schema, DROP TABLE REWRITE_TABLE and recreate it by invoking the admin/utlxrw.sql script prior to invoking the DBMS_MVIEW.EXPLAIN_REWRITE() API.