Upgrade fails at the post upgrade steps while executing the file POSTUPGRADE_COST_PLAN_DETAILS_COMPARE_HASH.xml
Steps to Reproduce:
Pre-requisite for this failure to induce
Expected Results: The upgrade should be successful
Actual Results: The upgrade will fail with below error stack
Process - post-upgrade: POSTUPGRADE_COST_PLAN_DETAILS_COMPARE_HASH.xml
3/05/25 4:53 PM (ExecTask) java.sql.BatchUpdateException: error occurred during batching: ORA-01418: specified index does not exist
3/05/25 4:53 PM (ExecTask) ORA-06512: at line 11
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) SQL Text:
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) DECLARE
3/05/25 4:53 PM (ExecTask) index_exists NUMBER;
3/05/25 4:53 PM (ExecTask) v_cnt number;
3/05/25 4:53 PM (ExecTask) v_loops NUMBER;
3/05/25 4:53 PM (ExecTask) v_batchsize NUMBER := 100000;
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) BEGIN
3/05/25 4:53 PM (ExecTask) -- If index is there on hash then dropping
3/05/25 4:53 PM (ExecTask) SELECT count(1) INTO index_exists FROM all_indexes WHERE upper(index_name) = 'FIN_COST_PLAN_DETAILS_U20';
3/05/25 4:53 PM (ExecTask) IF index_exists = 1 THEN
3/05/25 4:53 PM (ExecTask) EXECUTE IMMEDIATE 'DROP INDEX FIN_COST_PLAN_DETAILS_U20';
3/05/25 4:53 PM (ExecTask) END IF;
3/05/25 4:53 PM (ExecTask) at oracle.jdbc.driver.OracleStatement.executeLargeBatch(OracleStatement.java:4659)
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) select count(1) into v_cnt from fin_cost_plan_details where hash is null;
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) at oracle.jdbc.driver.OracleStatement.executeBatch(OracleStatement.java:4527) -- Doing update in batches
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) v_loops := CEIL(v_cnt/v_batchsize) ;
3/05/25 4:53 PM (ExecTask) at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:237)
3/05/25 4:53 PM (ExecTask) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
3/05/25 4:53 PM (ExecTask) FOR i IN 1..v_loops LOOP
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) UPDATE fin_cost_plan_details
3/05/25 4:53 PM (ExecTask) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) SET hash = LOWER(RAWTOHEX(STANDARD_HASH('' ||
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
3/05/25 4:53 PM (ExecTask) at java.base/java.lang.reflect.Method.invoke(Method.java:569)
3/05/25 4:53 PM (ExecTask) case when charge_code_id is not null then 'charge_code_id=' || charge_code_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:118)
3/05/25 4:53 PM (ExecTask) case when cost_type_id is not null then 'cost_type_id=' || cost_type_id || ';' else '' end || at jdk.proxy2/jdk.proxy2.$Proxy8.executeBatch(Unknown Source)
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.Utilities.executeAndCommitSql(Utilities.java:3159)
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.DriverApp.apply(DriverApp.java:1500)
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.DriverApp.apply(DriverApp.java:1458)
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:713)
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:2146)
3/05/25 4:53 PM (ExecTask) case when department_id is not null then 'department_id=' || department_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when input_type_code_id is not null then 'input_type_code_id=' || input_type_code_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:1157)
3/05/25 4:53 PM (ExecTask) case when location_id is not null then 'location_id=' || location_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when lov1_id is not null then 'lov1_id=' || lov1_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when lov2_id is not null then 'lov2_id=' || lov2_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when resource_class_id is not null then 'resource_class_id=' || resource_class_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when resource_id is not null then 'resource_id=' || resource_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when role_id is not null then 'role_id=' || role_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when transaction_class_id is not null then 'transaction_class_id=' || transaction_class_id || ';' else '' end ||
3/05/25 4:53 PM (ExecTask) case when description is not null then 'description=' || description || ';' else '' end
3/05/25 4:53 PM (ExecTask) , 'MD5')))
3/05/25 4:53 PM (ExecTask) WHERE id in (select id from fin_cost_plan_details where hash is null and rownum <= v_batchsize);
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) COMMIT;
3/05/25 4:53 PM (ExecTask) END LOOP;
3/05/25 4:53 PM (ExecTask)
3/05/25 4:53 PM (ExecTask) -- Creating index for hash
3/05/25 4:53 PM (ExecTask) EXECUTE IMMEDIATE 'CREATE UNIQUE INDEX FIN_COST_PLAN_DETAILS_U20 ON FIN_COST_PLAN_DETAILS(HASH, ID)';
3/05/25 4:53 PM (ExecTask) END;Clarity Version 16.2.3
DE167589
DE167589 currently in review with engineering team