Oracle 12.1.0.2 CDB creation - catcdb.sql returning ORA-22288 or ORA-29548

This post is also available in: Português

Those days I was trying to create an Oracle Database 12.1.0.2 CDB using only sqlplus in a Oracle Linux 6.5 64 bits.

So after issuing the CREATE DATABASE command, it was time to create all the dictionary:

$ sqlplus / as sysdba @?/rdbms/admin/catcdb.sql

However, something was going wrong because both Oracle Java and Oracle Multimedia were having their catalog creation scripts aborted and their status became INVALID on cdb_registry after the catcdb.sql execution:

catcon: ALL catcon-related output will be written to initjvm_catcon_11063.lst
catcon: See initjvm*.log files for output generated by scripts
catcon: See initjvm_*.lst files for spool files, if any
A process terminated prior to completion.
    Review the initjvm*.log files to identify the failure
Died at /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catcon.pm line 6149.
catcon: ALL catcon-related output will be written to catim_catcon_11536.lst
catcon: See catim*.log files for output generated by scripts
catcon: See catim_*.lst files for spool files, if any
A process terminated prior to completion.
    Review the catim*.log files to identify the failure
Died at /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catcon.pm line 6149.

Checking the error on catim0.log file (Oracle Multimedia), it was failing because Oracle Java was not deployed correctly. So checking initvm0.log file, the error was "ORA-22288: file or LOB operation FILEOPEN failed":

create or replace java system
begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.INITJVMAUX", line 28
ORA-06512: at line 5

After doing some research, I've found a Chinese post referencing and Doc ID 143773.1 with a similar problem and which solution was to create the java classes.bin file on $ORACLE_HOME/javavm/admin.

[oracle@localhost ~]$ cd $ORACLE_HOME/javavm/admin
[oracle@localhost admin]$ ls
jdk.versions libjtcjt.so
[oracle@localhost admin]$ ln -s ../jdk/jdk6/admin/classes.bin .
[oracle@localhost admin]$ ls -la
total 220
drwxr-xr-x. 2 oracle oinstall   4096 May 24 10:42 .
drwxr-xr-x. 8 oracle oinstall   4096 May 19 15:41 ..
lrwxrwxrwx. 1 oracle oinstall     29 May 23 14:42 classes.bin -> ../jdk/jdk6/admin/classes.bin
-rw-r--r--. 1 oracle oinstall    723 Jul 14  2011 jdk.versions
-rw-r--r--. 1 oracle oinstall 211789 Jun 30  2014 libjtcjt.so

After creating the file, I've called the catcdb.sql in a new empty container and the problem happened again, but now it changed to "ORA-29548: Java system class reported: release of classes.bin in the database". Something related to the Java Version:

create or replace java system
begin if initjvmaux.startstep('CREATE_JAVA_SYSTEM') then
*
ERROR at line 1:
ORA-29548: Java system class reported: release of classes.bin in the database
does not match that of the oracle executable
ORA-06512: at "SYS.INITJVMAUX", line 28
ORA-06512: at line 5

What happened is that unfortunately I've linked the jdk6 classes.bin file, but my database was using jdk7 in the binaries libraries. So I had to link again the file now against the right classes.bin file:

[oracle@localhost admin]$ rm classes.bin
[oracle@localhost admin]$ ln -s ../jdk/jdk7/admin/classes.bin .
[oracle@localhost admin]$ ls -la
total 220
drwxr-xr-x. 2 oracle oinstall   4096 May 24 10:42 .
drwxr-xr-x. 8 oracle oinstall   4096 May 19 15:41 ..
lrwxrwxrwx. 1 oracle oinstall     29 May 24 10:42 classes.bin -> ../jdk/jdk7/admin/classes.bin
-rw-r--r--. 1 oracle oinstall    723 Jul 14  2011 jdk.versions
-rw-r--r--. 1 oracle oinstall 211789 Jun 30  2014 libjtcjt.so

Voilà! After calling catcdb.sql one more time in a newly created container, it finally run smooth and in the end I've got VALID status for all registry entries in cdb_registry.

Have you enjoyed? Please leave a comment or give a 👍!

Leave a Reply

Your email address will not be published.