My Oracle Support Banner

Autoupgrade fail with string index out of range: -1 while CREATEPLUGGABLEDATABASE TASK (Doc ID 2863180.1)

Last updated on JULY 20, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 19.14.0.0.0 and later
Information in this document applies to any platform.

Symptoms

Upgrading non-cdb to cdb database using Autoupgrade tool.

The autoupgrade has upgraded the database successfully but is throwing error in its last phase while "CreatePluggableDatabase task - NonCDBToPDB.executeNonCDBToPDB "

Upgrade log :

====================================
2022-04-12 16:10:10.999 INFO [Upgrading] is [100%] completed for
[<db_unique_name>]
+------------+------------------------------------+
| CONTAINER| PERCENTAGE|
+------------+------------------------------------+
|TR4ODD01_PR1|SUCCESSFULLY UPGRADED [<db_unique_name>]|
+------------+------------------------------------+ -
CatctlMonUtils.displayCompletionPercentage

2022-04-12 16:10:12.447 INFO The process ended successfully with the following output
Grand Total Upgrade Time: [0d:0h:25m:25s]
..

...


2022-04-12 16:19:30.276 INFO Starting CreatePluggableDatabase task - NonCDBToPDB.executeNonCDBToPDB
2022-04-12 16:19:30.286 WARNING Execution of the JobStageAction [oracle.upgrade.autoupgrade.dispatcher.facade.subsystems.ExecuteNonCDBToPDB] failed due to [java.lang.StringIndexOutOfBoundsException] - JobStage.executeStage
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  at java.lang.String.substring(String.java:1967)
  at oracle.upgrade.commons.pojos.PdbConversionOption.getCopyRecords(PdbConversionOption.java:246)
  at oracle.upgrade.autoupgrade.noncdbtopdb.converttopdb.CreatePluggableDatabase.createTreeForTargetDestinations(CreatePluggableDatabase.java:273)
  at oracle.upgrade.autoupgrade.noncdbtopdb.converttopdb.CreatePluggableDatabase.action(CreatePluggableDatabase.java:206)
..

...

2022-04-12 16:19:30.296 INFO ----------------------Stages Summary------------------------ - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.296 INFO SETUP <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.296 INFO GRP <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.296 INFO PREUPGRADE <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO PRECHECKS <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO PREFIXUPS <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO DRAIN 1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO DBUPGRADE 25 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO DISPATCH <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO POSTCHECKS <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO POSTFIXUPS 6 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO POSTUPGRADE <1 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.297 INFO NONCDBTOPDB 2 min - DispatcherOSHelper.writeStageSummary
2022-04-12 16:19:30.298 INFO End of dispatcher instance for TR4ODD01_PR1 - AutoUpgDispatcher.run
====================================

 

 autoupgrade_err.log
=============

2022-04-12 16:19:30.287 WARNING Execution of the JobStageAction [oracle.upgrade.autoupgrade.dispatcher.facade.subsystems.ExecuteNonCDBToPDB] failed due to [java.lang.StringIndexOutOfBoundsException] - JobStage.executeStage
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at oracle.upgrade.commons.pojos.PdbConversionOption.getCopyRecords(PdbConversionOption.java:246)
at oracle.upgrade.autoupgrade.noncdbtopdb.converttopdb.CreatePluggableDatabase.createTreeForTargetDestinations(CreatePluggableDatabase.java:273)
at oracle.upgrade.autoupgrade.noncdbtopdb.converttopdb.CreatePluggableDatabase.action(CreatePluggableDatabase.java:206)
at oracle.upgrade.autoupgrade.noncdbtopdb.NonCDBToPDB.executeNonCDBToPDB(NonCDBToPDB.java:284)

 

As a result, there is no pdb created at target 19c CDB.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.