Upgrade fails with ORA-01438: value larger than specified precision allowed for this column
search cancel

Upgrade fails with ORA-01438: value larger than specified precision allowed for this column

book

Article ID: 386785

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Upgrade to 16.2.2 fails with error:

1/24/25 4:18 PM (ExecTask) Process - pre-upgrade: PREUPGRADE_KEY_RESULTS_VALUE_TYPE.xml
1/24/25 4:18 PM (ExecTask) java.sql.BatchUpdateException: error occurred during batching: ORA-01438: value larger than specified precision allowed for this column
1/24/25 4:18 PM (ExecTask) ORA-06512: at line 40
1/24/25 4:18 PM (ExecTask) 
1/24/25 4:18 PM (ExecTask)     at oracle.jdbc.driver.OracleStatement.executeLargeBatch(OracleStatement.java:4659)
1/24/25 4:18 PM (ExecTask)     at oracle.jdbc.driver.OracleStatement.executeBatch(OracleStatement.java:4527)
1/24/25 4:18 PM (ExecTask)     at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:237)
1/24/25 4:18 PM (ExecTask)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
1/24/25 4:18 PM (ExecTask)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
1/24/25 4:18 PM (ExecTask)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
1/24/25 4:18 PM (ExecTask)     at java.base/java.lang.reflect.Method.invoke(Method.java:569)
1/24/25 4:18 PM (ExecTask)     at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:118)
1/24/25 4:18 PM (ExecTask)     at jdk.proxy2/jdk.proxy2.$Proxy8.executeBatch(Unknown Source)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.Utilities.executeAndCommitSql(Utilities.java:3159)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.DriverApp.apply(DriverApp.java:1500)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.DriverApp.apply(DriverApp.java:1458)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.DriverApp.installSchemaDriver(DriverApp.java:713)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.Utilities.run(Utilities.java:2146)
1/24/25 4:18 PM (ExecTask)     at com.niku.dbtools.Utilities.main(Utilities.java:1157)

Environment

Clarity 16.2.2 and 16.2.3 install scripts

Cause

You have a value or values that are 19 digits or more for:

  • Table OKR_KEY_RESULTS 
  • Columns START_VALUE, CURRENT_VALUE, TARGET_VALUE

Resolution

We are changing the column to DECIMAL(20,2) so the value should be 18 digits maximum, and 2 decimals

  1. Rollback
  2. Make sure you update the fields in OKR_KEY_RESULTS to be a smaller number and then start the upgrade again. 

Example query you can use to reset values (change the ID to the correct one) : 

update OKR_KEY_RESULTS set start_value='1', current_value ='1', target_value ='1' where id =<5000000>

commit