Issue
- When trying to upgrade Liferay DXP from a 7.4 U release to 2024.q1.3 using a DB2 11.5 database, we encountered the following errors relating to the UserGroupGroupRole table:
INFO [ServerService Thread Pool -- 78][UpgradeProcess:119] Upgrading com.liferay.portal.upgrade.v7_4_x.PortalUpgradeProcessRegistryImpl - Modifying table UserGroupGroupRole to alter the type of the column groupId to LONG null
INFO [ServerService Thread Pool -- 78][DB2DB:127] Attempting to upgrade table UserGroupGroupRole by adding a temporary column due to: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=;alter table UserGroupGroupRole;set data type bigint;<space>, DRIVER=4.31.10
INFO [ServerService Thread Pool -- 78][UpgradeProcess:137] Failed upgrade process com.liferay.portal.upgrade.v7_4_x.PortalUpgradeProcessRegistryImpl - Modifying table UserGroupGroupRole to alter the type of the column groupId to LONG null in 120294 ms
INFO [ServerService Thread Pool -- 78][PortalUpgradeProcess:335] Failed upgrade process com.liferay.portal.upgrade.PortalUpgradeProcess in 120341 ms
ERROR [ServerService Thread Pool -- 78][PortalContextLoaderListener:70] com.liferay.portal.kernel.upgrade.UpgradeException: com.ibm.db2.jcc.am.SqlTransactionRollbackException: DB2 SQL Error: SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68, DRIVER=4.31.10
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.ibm.db2.jcc.am.SqlTransactionRollbackException: DB2 SQL Error: SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68, DRIVER=4.31.10
Environment
Resolution
- As the root cause of this is a database driver error (see the error portion that notes "
ERROR ... DB2 SQL Error: SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68, DRIVER=4.31.10"), this can be resolved by switching the bundle's DB2 driver to a more recent one which no longer encounters the issue