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

カラム 'classNameId' に値 NULL を挿入できません。

Written By

Dávid Hegedüs

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.

問題

  • アップグレード中に、以下のようなエラーが発生することがあります:
    ERROR [main][BatchingBatch:134] HHH000315: Exception executing batch [java.sql.BatchUpdateException: Cannot insert the value NULL into column 'classNameId', table 'DB_NAME.dbo.ClassName_'; column does not allow nulls. INSERT fails.], SQL: insert into ClassName_ (mvccVersion, value, classNameId) values (?, ?, ?)

環境

  • Liferay 7.4 U60+

解像度

  • 一括挿入プロパティが有効になっているか確認してください:
    データベースプロバイダー プロパティ
    MariaDB rewriteBatchedStatements=true
    MySQL rewriteBatchedStatements=true
    PostgreSQL reWriteBatchedInserts=true
    SQL Server useBulkCopyForBatchInsert=true
  • お使いのDBベンダーによって、これらのいずれかが有効になっている場合は、それを削除すれば問題は解決するはずです。

追加情報

  • portal-upgrade-database.properties ファイルで、JDBC 構成のバッチ挿入プロパティを有効にできます 。 これは、INSERTステートメントのバッチ処理により実行を高速化することにより、パフォーマンスを向上させるものです。 この機能はDB2およびOracleデータベースでは使用できません。
  • バッチ挿入プロパティは、Liferay 7.4 U60+/GA60+のportal-upgrade-database.propertiesファイルに含まれています。

Did this article resolve your issue ?

Legacy Knowledge Base