Legacy Knowledge Base
Published Sep. 10, 2025

java.sql.SQLException: Incorrect string value and no Display Templates listed for the Breadcrumb widget

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

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.

Issue

  • On startup, the server will print errors similar to these:
    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
  • When wanting to select a Display Template for the Breadcrumb widget, no options will be listed:
    Breadcrumb_Display_Templates_Issue.gif

Environment

  • Liferay DXP 7.1

Resolution

  • Root cause: Either the database schema, tables or both haven't got character set utf8 and collate utf8_general_ci
  • Contact your Database Admin Team (DBA) to perform the changes. The requirement from Liferay is that the schema and all tables need to have character set utf8 and collate utf8_general_ci. Below some simplified steps, provided only as a proof-of-concept and whose usage is not recommended:

    1) Stop the server and perform a full backup of your database and perform a test always on non-production first
    2) Make sure the schema is properly set:
    ALTER DATABASE lportal CHARACTER SET utf8 COLLATE utf8_general_ci;
    3) Gather all table names and prepare the DB modification commands:
    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) The query will generate a list of commands you can execute in the DB
    5) Once done, perform the usual cleanup routine:

    - Delete the content of the following folders: liferay/work, Liferay/osgi/state, Tomcat/work and Tomcat/temp
    - Restart the server (the java.sql.SQLException should be gone)
    - Clear the browser's cache or test in Incognito mode, Breadcrumbs Display Templates should be listed now.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base