Upgrade task 4408 fails with: "java.sql.SQLException: ORA-22859: invalid modification of columns"
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Bamboo using Oracle DB fails to upgrade and presents the following errors in atlassian-bamboo.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2017-05-16 14:39:08,435 INFO [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [AbstractUpgradeManager] 4408 : Increase size of variable value in context to 4000 characters (post-bootstrap,
priority)
2017-05-16 14:39:08,435 INFO [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [AbstractUpgradeManager] -------------------------------------------------------------------------------------
----------
2017-05-16 14:39:08,436 INFO [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [UpgradeTask4408ResizeVariableContextValueField] Oracle DBMS: proceeding with alter table
2017-05-16 14:39:08,476 WARN [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [SqlExceptionHelper] SQL Error: 22859, SQLState: 99999
2017-05-16 14:39:08,477 ERROR [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [SqlExceptionHelper] ORA-22859: invalid modification of columns
2017-05-16 14:39:08,487 ERROR [16-UpgradeTaskBackgroundThread:pool-31-thread-1] [AbstractUpgradeManager] org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hiberna
te data access: SQLException for SQL [n/a]; SQL state [99999]; error code [22859]; error executing work; nested exception is org.hibernate.exception.GenericJDBCException: error executing wo
rk
org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [99999]; error code [22859]; error executing work;
nested exception is org.hibernate.exception.GenericJDBCException: error executing work
at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:171)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:344)
at org.springframework.orm.hibernate5.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)
at com.atlassian.bamboo.persistence.BambooConnectionTemplate$1.doInTransactionWithoutResult(BambooConnectionTemplate.java:35)
at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at com.atlassian.bamboo.persistence.BambooConnectionTemplate.execute(BambooConnectionTemplate.java:30)
at com.atlassian.bamboo.upgrade.tasks.AbstractInHibernateTransactionUpgradeTask.doUpgrade(AbstractInHibernateTransactionUpgradeTask.java:35)
at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:210)
at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:95)
...
Caused by: org.hibernate.exception.GenericJDBCException: error executing work
...
Caused by: java.sql.SQLException: ORA-22859: invalid modification of columns
...
at com.atlassian.bamboo.upgrade.tasks.v5_6.UpgradeTask4408ResizeVariableContextValueField.doUpgrade(UpgradeTask4408ResizeVariableContextValueField.java:58)
Cause
The upgrade task 4408 is part of Bamboo 5.6 changes and requires Oracle 11g to succeed.
If an upgrade path tries this upgrade task with Oracle 12c, for example, it will fail. This will happen if we jump from a version prior to 5.6 to a version above 5.11.
Resolution
Add an additional upgrade step to Bamboo 5.11 to make sure all upgrade tasks designed to run using Oracle 11g are run with this database version.
upgrade Bamboo using Oracle 11g to Bamboo 5.11 (latest Bamboo version using Oracle 11g according to Bamboo v5.11 - Supported platforms)
make sure the upgrade succeeded and Bamboo is working as expected
migrate database from Oracle 11g to 12c
start Bamboo 5.11, making sure the same works correctly
upgrade Bamboo to aimed version
ℹ️ As a good practice, backup Bamboo logs during the upgrade process on each step so it can be reviewed by Atlassian Support in case needed.
Was this helpful?