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

java.sql.SQLException:文字列の値が正しくなく、パンくずウィジェットの表示テンプレートが表示されていません。

written-by

Alfonso Crisci

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

問題

  • 起動時に、サーバーは以下のようなエラーを表示します:
    ERROR [main][JDBCExceptionReporter:234] Incorrect string value: '\xE5\x9F\xBA\xE6\x9C\xAC...' for column 'name' at row 1
    WARN [main][PortalInstanceLifecycleListenerManagerImpl:140] Unable to register portal instance {mvccVersion=1, companyId=20099, accountId=20101, webId=liferay.com, key=redacted, mx=liferay.com, homeURL=, logoId=0, system=false, maxUsers=0, active=true}
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
    [...]
    Caused by: java.sql.SQLException: Incorrect string value: '\xE7\xA4\xBE\xE5\x8C\xBA...' for column 'name' at row 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
    ... 288 more
  • パンくずウィジェットの表示テンプレートを選択しようとすると、オプションが表示されない:
    Breadcrumb_Display_Templates_Issue.gifの場合

環境

  • Liferay DXP 7.1

解像度

  • 根本原因:データベーススキーマ、テーブル、またはその両方に文字セットutf8 照合utf8_general_ci がありません。
  • データベース管理チーム(DBA)に連絡して、変更を実行します。 Liferay の要件は、スキーマとすべてのテーブルが character set utf8 collate utf8_general_ciを持つ必要があることです。 以下は、概念実証として提供され、その使用は推奨されない簡略化された手順です:

    1) サーバーを停止し、データベースのフルバックアップを行い、非本番のファーストで常にテストを行う
    2) スキーマが適切に設定されていることを確認する:
    ALTER DATABASE lportal CHARACTER SET utf8 COLLATE utf8_general_ci;
    3) すべてのテーブル名を集め、DB変更コマンドを用意する:
    SELECT CONCAT('ALTER TABLE ', tbl.TABLE_SCHEMA, '.', tbl.TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') FROM information_schema.TABLES tbl WHERE tbl.TABLE_SCHEMA = 'lportal';
    4) クエリは、DB
    で実行できるコマンドのリストを生成します。 5) 実行したら、通常のクリーンアップルーチンを実行します:

    - liferay/work, Liferay/osgi/state, Tomcat/work, Tomcat/temp
    - サーバーを再起動する( java.sql.SQLException は消えているはず)
    - ブラウザのキャッシュをクリアするかIncognitoモードでテストすると、Breadcrumbs Display Templatesが表示されていると思います。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base