“MDS_INTERNAL_SHREDDED” has errors … while starting Oracle WebCenter Portal

I got below error while starting Oracle WebCenter Portal server with on Oracle XE 10g database.

MDS-01370: MetadataStore configuration for metadata-store-usage “OWSM_TargetRepos” is invalid.
ORA-04063: package body “DEV_MDS.MDS_INTERNAL_SHREDDED” has errors
ORA-06508: PL/SQL: could not find program unit being called: “DEV_MDS.MDS_INTERNAL_SHREDDED”

When this error happen WebCenter Portal Managed Server is not started.
Please follow below steps to resolve the issue.

  • Stop server
  • Drop the all related database schemas using RCU.
  • Connect to XE database using sqlplus command through command prompt.
  • Connect sys as SYSDBA and provide a password for SYS user

    alter system set sga_target=350M scope=spfile;
    alter system set sga_max_size=350M scope=spfile;
    shutdown immediate
    startup

  • set RCU_JDBC_TRIM_BLOCKS=TRUE environment variable and run RCU to create schemas again.
  • Verify if RCU_JDBC_TRIM_BLOCKS set properly.

    set RCU_JDBC_TRIM_BLOCKS=TRUE Echo % RCU_JDBC_TRIM_BLOCKS % — this has to return TRUE

    Now run rcu.bat in same command prompt window and create required schemas.
    Note : This issue will happen only on XE 10g database.