Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-144609

Cannot execute upgrade with DB partitioning enabled due to "java.sql.SQLException: Connection is closed" error

Details

    Description

      Cannot execute upgrade with DB partitioning enabled. Upon examination, I determined that the issue is caused by LPS-144013.

      Steps to Reproduce:

      1. Set up database using 7.4.1 dump.
      2. Add portal property "database.partition.enabled=true" to portal-upgrade-ext.properties.
      3. Execute upgrade.

      Actual Result:
      A SQLException exception occurs and stops the upgrade.

      2021-12-29 00:33:01.922 INFO  [main][UpgradeProcess:119] Upgrading com.liferay.portal.upgrade.PortalUpgradeProcess#20100
      2021-12-29 00:33:01.925 INFO  [main][UpgradeProcess:119] Upgrading com.liferay.portal.upgrade.v7_4_x.UpgradeAccount#20100
      2021-12-29 00:33:01.938 INFO  [main][LoggingTimer:83] Starting com.liferay.portal.kernel.upgrade.UpgradeProcess#alter
      2021-12-29 00:33:02.067 INFO  [main][LoggingTimer:44] Completed com.liferay.portal.kernel.upgrade.UpgradeProcess#alter in 129 ms
      2021-12-29 00:33:02.068 INFO  [main][UpgradeProcess:134] Failed upgrade process com.liferay.portal.upgrade.v7_4_x.UpgradeAccount in 143 ms
      2021-12-29 00:33:02.068 INFO  [main][UpgradeProcess:134] Failed upgrade process com.liferay.portal.upgrade.PortalUpgradeProcess in 302 ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Connection is closed
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:173)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:136)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:172)
      	at com.liferay.portal.tools.DBUpgrader._upgradePortal(DBUpgrader.java:375)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:161)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:153)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:129)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:54)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Connection is closed
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:150)
      	at com.liferay.portal.upgrade.PortalUpgradeProcess.doUpgrade(PortalUpgradeProcess.java:137)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:122)
      	at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:128)
      	at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:308)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:241)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)
      	... 12 more
      Caused by: java.sql.SQLException: Connection is closed
      	at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.lambda$getClosedConnection$0(ProxyConnection.java:475)
      	at com.sun.proxy.$Proxy18.getMetaData(Unknown Source)
      	at com.zaxxer.hikari.pool.ProxyConnection.getMetaData(ProxyConnection.java:355)
      	at com.zaxxer.hikari.pool.HikariProxyConnection.getMetaData(HikariProxyConnection.java)
      	at com.liferay.portal.dao.jdbc.util.ConnectionWrapper.getMetaData(ConnectionWrapper.java:152)
      	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:385)
      	at com.sun.proxy.$Proxy23.getMetaData(Unknown Source)
      	at com.liferay.portal.kernel.dao.db.DBInspector.hasColumn(DBInspector.java:66)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.hasColumn(BaseDBProcess.java:186)
      	at com.liferay.portal.upgrade.v7_4_x.UpgradeAccount._addColumnToCompanyTable(UpgradeAccount.java:175)
      	at com.liferay.portal.upgrade.v7_4_x.UpgradeAccount.doUpgrade(UpgradeAccount.java:36)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:122)
      	at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:119)
      	at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:308)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:241)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109)
      	... 19 more
      

      Expected Result:
      The upgrade is able to complete (or at least continues).

      Attachments

        Issue Links

          Activity

            People

              victor.ware Victor Ware
              kevin.lee Kevin Lee
              Marta Elicegui Marta Elicegui
              Alberto Chaparro Alberto Chaparro
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                46 weeks, 3 days ago

                Packages

                  Version Package
                  7.4.3.8 CE GA8
                  7.4.13 DXP U4
                  Master