Legacy Knowledge Base
公開されました Sep. 10, 2025

ERROR: 集約関数は UPDATE ポジションで許可されていません:54 PostgreSQL データベースアップグレード時

Written By

Cristina Rodriguez

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • 7.4へのアップグレード中に、 com.liferay.portal.upgrade.v7_4_x.UpgradeCompanyId.UpgradeCompanyId.UpgradeCompanyIdプロセスで致命的なエラーが発生しました:
INFO  [main][UpgradeProcess:145] Failed upgrade process com.liferay.portal.upgrade.v7_4_x.UpgradeCompanyId in 76 ms
INFO [main][PortalUpgradeProcess:190] Failed upgrade process com.liferay.portal.upgrade.PortalUpgradeProcess in 23167 ms
ERROR [main][DBUpgrader:79] null
com.liferay.portal.kernel.log.LogSanitizerException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: org.postgresql.util.PSQLException: ERROR: aggregate functions are not allowed in UPDATE Position: 54
  • PostgreSQLのログにこのエラーがあります。

    ERROR:  aggregate functions are not allowed in UPDATE at character 54
    STATEMENT: update PortalPreferenceValue set companyId = (select max(companyId) from PortalPreferences where PortalPreferences.portalPreferencesId > 0 and PortalPreferences.portalPreferencesId = PortalPreferenceValue.portalPreferencesId)

Environment

  • Liferay 7.4にアップグレードしてください。
  • ジャバ8

解決策

  • このエラーを回避するには、 Java 11を使用します。
  • https://liferay.atlassian.net/browse/LPS-186837。

Did this article resolve your issue ?

Legacy Knowledge Base