Invalid JAVAVM after patch on Oracle ROOH 18.8 (Windows)

Although my main work is as a developer, among other thing I’m also in charge of testing infrastructure (to test my work) and I usually face issues, the below is a problem that occurred on Windows Server 2019

Symptoms, invalid JAVAVM component after patching Oracle DB 18 with 18.8.0.0.191015 RU.

Interim patch 28267731 (WINDOWS OJVM BUNDLE PATCH : 18.3.0.0.180717 (28267731))

This happened on a Read Only Oracle Home configuration

The alert log has the following legend

PDBX(3):SERVER COMPONENT id=UTLRP_BGN: timestamp=2019-12-03 09:03:52 Container=PDBX Id=3
2019-12-03T09:03:55.429707-08:00
PDBX(3):SERVER COMPONENT id=UTLRP_END: timestamp=2019-12-03 09:03:55 Container=PDBX Id=3
2019-12-03T09:04:00.210952-08:00
PDBX(3):joxcsys: release mismatch, 18.1.0.0.0 1.8 in database (classes.bin) vs 18.7.0.0.0 1.8 in executable pid 3440 cid 3

The important line is below

PDBX(3):joxcsys: release mismatch, 18.1.0.0.0 1.8 in database (classes.bin) vs 18.7.0.0.0 1.8 in executable pid 3440 cid 3 

fix

Prepare your terminal

set ORACLE_SID=cdb18eero
set ORACLE_HOME=C:\databases\rooh\18x\dbhome_1ee
set PATH=%ORACLE_HOME%\bin;%PATH%
set PATH=%ORACLE_HOME%\OPatch;%ORACLE_HOME%\bin;%PATH%
set PERL5LIB=%ORACLE_HOME%\perl\lib

Having your database in open mode with all the PDBs

sqlplus / as sysdba
alter pluggable database all open;

execute the following

%ORACLE_HOME%\perl\bin\perl %ORACLE_HOME%\rdbms\admin\catcon.pl -d %ORACLE_HOME%\javavm\install -b %ORACLE_SID%_javafix update_javavm_db.sql

once it finished, restart the database and open the containers again, then create a file with the below content (I called it c:\temp\fix.sql)

@?/rdbms/admin/utlrp

EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

BEGIN
DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
END;
/ 
set line 180
set pagesize 50
COL COMP_ID for a10
COL COMP_NAME for a40
COL VERSION for a20
COL VERSION_FULL for a20
COL STATUS for a15
COL SCHEMA for a15
SELECT COMP_ID, COMP_NAME,VERSION,STATUS,SCHEMA,VERSION_FULL
FROM SYS.DBA_REGISTRY
WHERE STATUS = 'INVALID';

set line 180
set pagesize 50
col OWNER for a11
col OBJECT_NAME for a40
col OBJECT_TYPE for a20
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE
FROM SYS.DBA_OBJECTS
WHERE STATUS = 'INVALID'
order by OBJECT_NAME,OWNER; 

and run

%ORACLE_HOME%\perl\bin\perl %ORACLE_HOME%\rdbms\admin\catcon.pl -d c:\temp -b %ORACLE_SID%_fix fix.sql

after that all is perfect

free song