The below CATJAVA and JAVAVM components are invalid during 19c database upgrade. The below steps are needs to run to fix the corrupted database components.
Steps :-
1) Check DBA_REGISTRY_COMPONENTS STATUS :
SQL> SELECT substr(comp_id,1,12)Comp_ID, Status,
substr(Version,1,10)Version,
substr(Comp_Name,1,40)Comp_Name
FROM DBA_Registry
ORDER by 1,2;
COMP_ID STATUS VERSION COMP_NAME
———— ———– ———- —————————————-
CATJAVA INVALID 19.0.0.0.0 Oracle Database Java Packages
JAVAVM INVALID 19.0.0.0.0 JServer JAVA Virtual Machine
2) Run below scripts are SYS user.
alter system set “_system_trig_enabled” = false scope=memory;
@?/rdbms/admin/catnojav.sql
@?/rdbms/admin/catjava.sql
3) Validate the CATJAVA component.
execute sys.dbms_registry.invalid(‘CATJAVA’);
execute sys.dbms_registry.valid(‘CATJAVA’);
4) Recreate JVM :
Execute below 4 scripts as sys:
alter trigger sys.dbms_java_dev_trg disable;
alter table sys.procedurejava$ disable constraint java_dev_disabled;
alter table sys.javajar$ disable constraint java_dev_jars_disabled;
exec dbms_java_dev.enable;
DBMS_JAVA package / package body and synonym can be recreated running the following script as SYS:
$ORACLE_HOME/javavm/install/initdbj.sql
5) Check DBA_REGISTRY_COMPONENTS STATUS :
SELECT substr(comp_id,1,12)Comp_ID, Status,
substr(Version,1,10)Version,
substr(Comp_Name,1,40)Comp_Name
FROM DBA_Registry
ORDER by 1,2;
COMP_ID STATUS VERSION COMP_NAME
———— ———– ———- —————————————-
APEX VALID 5.0.4.00.1 Oracle Application Express
APS VALID 19.0.0.0.0 OLAP Analytic Workspace
CATALOG VALID 19.0.0.0.0 Oracle Database Catalog Views
CATJAVA VALID 19.0.0.0.0 Oracle Database Java Packages
CATPROC VALID 19.0.0.0.0 Oracle Database Packages and Types
CONTEXT VALID 19.0.0.0.0 Oracle Text
JAVAVM VALID 19.0.0.0.0 JServer JAVA Virtual Machine
ORDIM VALID 19.0.0.0.0 Oracle Multimedia
OWM VALID 19.0.0.0.0 Oracle Workspace Manager
RAC VALID 19.0.0.0.0 Oracle Real Application Clusters
SDO VALID 19.0.0.0.0 Spatial
COMP_ID STATUS VERSION COMP_NAME
———— ———– ———- —————————————-
XDB VALID 19.0.0.0.0 Oracle XML Database
XML VALID 19.0.0.0.0 Oracle XDK
XOQ VALID 19.0.0.0.0 Oracle OLAP API
14 rows selected.