Datapatch fails with ORA-29516, ORA-00604 and ORA-29532 java.lang.ArrayIndexOutOfBoundsException

This post is also available in: English

Those days, while trying to apply 19.5 RU over a 19c Oracle Database (clean 19.2 installation), the datapatch apply phase was trowing me an error:

$ datapatch -verbose
SQL Patching tool version 19.5.0.0.0 Production on Mon Oct 21 07:46:31 2019
Copyright (c) 2012, 2019, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_824_2019_10_21_07_46_31/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done

Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)

Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
  No interim patches found

Current state of release update SQL patches:
  Binary registry:
    19.5.0.0.0 Release_Update 190909180549: Installed
  PDB CDB$ROOT:
    No release update patches installed
  PDB PDB:
    No release update patches installed
  PDB PDB$SEED:
    No release update patches installed

Adding patches to installation queue and performing prereq checks...done
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED PDB
    No interim patches need to be rolled back
    Patch 30125133 (Database Release Update : 19.5.0.0.191015 (30125133)):
      Apply from 19.1.0.0.0 Feature Release to 19.5.0.0.0 Release_Update 190909180549
    No interim patches need to be applied

Installing patches...
Patch installation complete.  Total patches installed: 3

Validating logfiles...done
Patch 30125133 apply (pdb CDB$ROOT): WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30125133/23151502/30125133_apply_ORCL_CDBROOT_2019Oct21_07_47_49.log (errors)
  -> Error at line 121867: script md/admin/catmdloc.sql
      - ORA-29516: Aurora assertion failure: Bogus uncaught exception
      - ORA-00604: error occurred at recursive SQL level 1
      - ORA-29532: Java call terminated by uncaught Java exception:
      - java.lang.ArrayIndexOutOfBoundsException
  -> Error at line 121923: script md/admin/catmdloc.sql
      - ORA-29516: Aurora assertion failure: Bogus uncaught exception
      - ORA-00604: error occurred at recursive SQL level 1
      - ORA-29532: Java call terminated by uncaught Java exception:
      - java.lang.ArrayIndexOutOfBoundsException
Patch 30125133 apply (pdb PDB$SEED): WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30125133/23151502/30125133_apply_ORCL_PDBSEED_2019Oct21_07_57_41.log (errors)
  -> Error at line 184635: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details
  -> Error at line 184654: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details
  -> Error at line 184697: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details
Patch 30125133 apply (pdb PDB): WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30125133/23151502/30125133_apply_ORCL_PDB_2019Oct21_07_57_41.log (errors)
  -> Error at line 121867: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details
  -> Error at line 121886: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details
  -> Error at line 121929: script md/admin/catmdloc.sql
      - ORA-29532: Java call terminated by uncaught Java exception:
      - oracle.aurora.server.tools.loadjava.ToolsError:
      - Error during loadjava: Failures occurred during processing.
      - Check trace file for details

Please refer to MOS Note 1609718.1 and/or the invocation log
/u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_824_2019_10_21_07_46_31/sqlpatch_invocation.log
for information on how to resolve the above errors.

SQL Patching tool complete on Mon Oct 21 08:46:24 2019

Checking the log files, there was basically non-expected ORA- errors on 2 instructions:

SQL> call dbms_java.loadjava('-resolve  -synonym -schema MDSYS -grant PUBLIC
  2               md/jlib/sdoapi.jar md/jlib/sdoutl.jar md/jlib/sdotopo.jar
  3               md/jlib/sdotype.jar md/jlib/sdonm.jar md/jlib/sdogcdr.jar');
call dbms_java.loadjava('-resolve  -synonym -schema MDSYS -grant PUBLIC
*
ERROR at line 1:
ORA-29516: Aurora assertion failure: Bogus uncaught exception
ORA-00604: error occurred at recursive SQL level 1
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.ArrayIndexOutOfBoundsException
SQL> call dbms_java.loadjava('-resolve  -synonym -schema MDSYS -grant PUBLIC
  2               md/jlib/sdoapi.jar md/jlib/sdoutl.jar md/jlib/sdotopo.jar
  3               md/jlib/sdotype.jar md/jlib/sdonm.jar');
call dbms_java.loadjava('-resolve  -synonym -schema MDSYS -grant PUBLIC
*
ERROR at line 1:
ORA-29516: Aurora assertion failure: Bogus uncaught exception
ORA-00604: error occurred at recursive SQL level 1
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.ArrayIndexOutOfBoundsException

I couldn't find any specific note in MOS for the above errors.

The only way I could workaround this error was applying 19.4 RU before applying 19.5 RU. This solved my issue.

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

4 comentários

Pular para o formulário de comentário

    • Luis Santos em novembro 14, 2019 às 09:25
    • Responder

    I got same error too. I just instead of applying a 19.5.0RU over a 19 baserelease DB I create a new fresh CDB, using dbca, using a new fresh 19.5.0 DBHome. I installed thiss 19.5.0 db_home using a 19.5.0 dbhome golden image zip file, created after intructions found at https://gotodba.com/2019/10/01/using-oracle-gold-images

    Good to know that this was not a golden image introduced bug... 🙂

    I'll try to rollback the 19.5.0 RU into the already installed 19.5.0 by golden image. This is very new to me...

    • Luis Santos em novembro 14, 2019 às 10:14
    • Responder

    I discovered it's not possible to rollback a RU if it is already incorpored into OH as an Oracle Image. This make sense, of course...

    I'll have to reinstall 19c DB Home from base release (witch actually is a golden image with 19.3.0 RU from 2019APR) and install 19.4.0 and 19.5.0 in a row, just like you did it.

    • Luis Santos em novembro 14, 2019 às 11:32
    • Responder

    I got a good idea from a colleague: I will try to generate again a 19.5.0 golden image, from 19.3.0 base OH. But first i will generate a 19.4.0 (29834717) golden image in a intermediate step.

    After this I will apply the 19.5.0 RU (30125133) into this 19.4.0 golden image. This new 19.5.0 golden image would be bug free, at least for the bug described on this blog post... 🙂

    • Luis Santos em novembro 21, 2019 às 11:31
    • Responder

    The idea didn't work.

    I created a 19.5.0 golden imagem first applying 19.4.0 RU on 19.3.0 base release, and second applying 19.5.0 RU. All the process worked flawless. And if I check the $ORACLE_HOME/sqlpatch I can see both patches 29834717 (19.4.0) and 30125133 (19.5.0). Along with 29517242 (19.3.0), as the 19.3.0 base release golden image is just a 19.1.0 release with 29517242 applied...

    I successfully setup the OH, but DBCA failed on datapatch phase with the same error. I guess that on these situations the create database process detects and only apply datapatch on the latest patch. So it's impossible to evict this error. And it's impossible, up to now, to create flawless 19.5.0 DB golden image...

    I guess if you try to create another database on your 19.5.0 OH (the one you successfully applied 19.4.0 and 19.5.0 RUs in a row) you will get the same ORA-29516 errror...

Deixe um comentário

Seu e-mail não será publicado.