Skip to Content
author's profile photo Former Member
Former Member

MysqlDataTruncation: Data truncation: Data too long for column 'message'

Problem

The Data Hub stores (Error) messages in the database. The type of the field is VARCHAR(255) for MySQL databases.

It may be the case that the message is longer than 255 characters. This error has been seen when the processing of a large CSV file (~9MB) failed.

This issue should be fixed in the Data Hub:

 22-Jun-2016 15:56:33.736 SEVERE [http-nio-8080-exec-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Data Hub Web Services] in context with path [/datahub-webapp] threw exception
  org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement
     at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:252)
     at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:214)
     at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:521)
     at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
     at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
     at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)
     at com.hybris.datahub.csv.facade.impl.DefaultCsvImportFacade.createFailedDataLoadingAction(DefaultCsvImportFacade.java:108)
     at com.hybris.datahub.csv.facade.impl.DefaultCsvImportFacade.validateAnteRawFragments(DefaultCsvImportFacade.java:97)
     at com.hybris.datahub.csv.facade.impl.DefaultCsvImportFacade.importCsv(DefaultCsvImportFacade.java:65)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
     at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
     at com.sun.proxy.$Proxy157.importCsv(Unknown Source)
     at com.hybris.datahub.csv.rest.resources.CsvImportResource.importCsvFile(CsvImportResource.java:45)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
     at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
     at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
     at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
     at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
     at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
     at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
     at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
     at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213)
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:98)
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
     at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
     at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.lang.Thread.run(Thread.java:745)
 Caused by: org.hibernate.exception.DataException: could not execute statement
     at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:69)
     at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
     at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
     at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
     at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
     at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
     at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3281)
     at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3183)
     at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3525)
     at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:159)
     at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
     at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349)
     at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
     at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
     at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)
     at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:425)
     at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
     at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
     at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:77)
     at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
     ... 94 more
 Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'message' at row 1
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3885)
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141)
     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2077)
     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2062)
     at com.zaxxer.hikari.proxy.PreparedStatementProxy.executeUpdate(PreparedStatementProxy.java:61)
     at com.zaxxer.hikari.proxy.PreparedStatementJavassistProxy.executeUpdate(PreparedStatementJavassistProxy.java)
     at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
     ... 109 more
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 25, 2016 at 01:07 PM

    Hi Thomas,

    Thank you for bringing this to our attention. I will raise it with the Maintenance Team.

    I will also ask them if it is OK to issue an ALTER TABLE command on this table.

     ALTER TABLE dataloadingaction MODIFY message LONGTEXT
    

    UPDATE: I raised it with the Maintenance Team, the incident you can use to track it is, ECP-1128. It will be available for you to view after it has been validated.

    Regards,
    Luke

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.