Tuesday, July 12, 2022

ORA-29548:Java system reported: release mismatch

 When you are running the Preupgrade task to upgrade the database from 12c to 19.14.0.0.0 version either using DBUA or the Auto upgrade feature. Sometimes you might face the below error depending on your system. If you happen to run into below error, you can follow the below steps. One of the reasons you may find a similar issue is if an OJVM patch is applied or rolled back.

Error:

Contact Oracle Support for instructions on how to resolve this error. 

Error: ORA-29548 ORA-29548:Java system reported: release mismatch, 

12.2.0.1.180717 1.8 in database (classes.bin) vs 12.2.0.1.0 1.8 in executable

SQL> select dbms_java.lonname('TEST') from dual;

select dbms_java.lonname('TEST') from dual

                        *

ORA-29548: Java system class reported: joxcsys: release mismatch, 

12.2.0.1.180717 1.8 in database (classes.bin) vs 12.2.0.1.0 1.8 in executable

SQL> conn /as sysdba

Connected.

SQL>  @?/javavm/install/update_javavm_db.sql

SQL> SET FEEDBACK 1

SQL> SET NUMWIDTH 10

SQL> SET LINESIZE 80

SQL> SET TRIMSPOOL ON

SQL> SET TAB OFF

SQL> SET PAGESIZE 100

SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.


SQL> -- If Java is installed, do CJS.

SQL> -- If CJS can deal with the SROs inconsistent with the new JDK,

SQL> -- the drop_sros() call here can be removed.

SQL> call initjvmaux.drop_sros();

Call completed.

SQL> create or replace java system;

Java created.

SQL> update dependency$

  set p_timestamp=(select stime from obj$ where obj#=p_obj#)

  where (select stime from obj$ where obj#=p_obj#)!=p_timestamp and

  (select type# from obj$ where obj#=p_obj#)=29  and

  (select owner# from obj$ where obj#=p_obj#)=0;

161 rows updated.

SQL> commit;

SQL> alter session set "_ORACLE_SCRIPT"=false;

Session altered.

SQL> select dbms_java.longname('TEST') from dual;

DBMS_JAVA.LONGNAME('TEST')

-------------------------------------------------------------

TEST

1 row selected.


Once the above steps are followed and recompile the invalid objects. Now if you run Preupgrade script, the above error will not pop up. 

Happy Oracle Database Upgrades!!!


No comments:

Post a Comment