legacy-knowledge-base
公開されました Sep. 10, 2025

Database Upgrade from Liferay 6.2 to DXP 2024.Q4 Fails on Oracle 19

written-by

Jorge Diaz

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

When upgrading from Liferay 6.2 to DXP 2024.Q4 quarterly release using the `db_upgrade_client.sh` script, the process fails with the following error:

Type change is not allowed when altering column name. Column LayoutBranch.LayoutBranchId has different type than LONG not null

Here it is the complete stacktrace:

2025-01-06 22:46:49.313 INFO  [main][UpgradeProcess:119] Upgrading com.liferay.portal.upgrade.v7_0_1.UpgradeLayoutBranch
2025-01-06 22:46:49.383 INFO [main][UpgradeProcess:137] Failed upgrade process com.liferay.portal.upgrade.v7_0_1.UpgradeLayoutBranch in 71 ms
2025-01-06 22:46:49.383 INFO [main][UpgradeProcess:137] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_1 in 41227 ms
2025-01-06 22:46:49.393 ERROR [main][DBUpgrader:70] com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Type change is not allowed when altering column name. Column LayoutBranch.LayoutBranchId has different type than LONG not null
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Type change is not allowed when altering column name. Column LayoutBranch.LayoutBranchId has different type than LONG not null
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:172) ~[portal-kernel.jar:?]
[...]
at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:45) [com.liferay.portal.tools.db.upgrade.client.jar:?]
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Type change is not allowed when altering column name. Column LayoutBranch.LayoutBranchId has different type than LONG not null
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:146) ~[portal-kernel.jar:?]
[...]
at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:381) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:107) ~[portal-kernel.jar:?]
... 8 more
Caused by: java.sql.SQLException: Type change is not allowed when altering column name. Column LayoutBranch.LayoutBranchId has different type than LONG not null
at com.liferay.portal.kernel.dao.db.BaseDBProcess.alterColumnName(BaseDBProcess.java:222) ~[portal-kernel.jar:?]
at com.liferay.portal.upgrade.v7_0_1.UpgradeLayoutBranch.doUpgrade(UpgradeLayoutBranch.java:17) ~[portal-impl.jar:?]
at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:122) ~[portal-kernel.jar:?]
[...]

Environment

  • Upgrading from Liferay Portal 6.2 to DXP 2024.Q4 quarterly release
  • Oracle 19 database

Resolution

  • This error is typically caused by using an incompatible or outdated Oracle JDBC driver (e.g., ojdbc7-12.1.0.2) during the upgrade process.
  • Ensure you are using a supported and updated JDBC driver compatible with both Oracle 19 and Liferay DXP 7.4. The ojdbc17 driver is recommended for 2024.Q4.1.
  • Place the correct JDBC driver (ojdbc17.jar) in the $CATALINA_BASE/webapps/ROOT/WEB-INF/shielded-container-lib folder (more information see article Configuring a Database in learn.liferay.com)

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base