legacy-knowledge-base
公開されました Jun. 30, 2025

java.sql.BatchUpdateException: data exception: string data, right truncation from long client extension service names

written-by

Ricky Pan

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

Issue

  • When deploying a client extension, you may encounter an error, that can be traced to a BatchUpdateException, such as the following:
Caused by: java.sql.BatchUpdateException: data exception: string data, right truncation
at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(JDBCPreparedStatement.java:1835) ~[hsql.jar:2.7.1]
at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:127) ~[hikaricp.jar:?]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java) ~[hikaricp.jar:?]
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:125) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:110) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:153) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:633) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) ~[hibernate-core.jar:5.6.7.Final]
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:986) ~[?:?]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) ~[hibernate-core.jar:5.6.7.Final]
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407) ~[hibernate-core.jar:5.6.7.Final]
... 39 more

Environment

  • DXP 7.4

Resolution

  • This issue may be caused by long client extension service names (as defined in your client-extension.yaml) file. When Liferay registers the client extension services, it stores the service names into VARCHAR database fields, which has a default maximum length of 75. As a result, your client extension services must have names within 75 characters long (as of 2025.Q1). Note the service names in the sample client-extension.yaml code block below. These service names must be contained to 75 characters. 
assemble:
- from: batch
into: batch
liferay-clarity-batch:
name: Liferay Clarity Batch
oAuthApplicationHeadlessServer: liferay-clarity-batch-oauth-application-headless-server
type: batch
liferay-clarity-batch-oauth-application-headless-server:
.serviceAddress: localhost:8080
.serviceScheme: http
name: Liferay Clarity Batch OAuth Application Headless Server
scopes:
- Liferay.Headless.Admin.List.Type.everything
- Liferay.Headless.Admin.User.everything
- Liferay.Headless.Admin.Workflow.everything
- Liferay.Headless.Batch.Engine.everything
- Liferay.Notification.REST.everything
- Liferay.Object.Admin.REST.everything
type: oAuthApplicationHeadlessServer
did-this-article-resolve-your-issue

legacy-knowledge-base