In some cases, like with the S3 blob store, it can happen that value inserted in column LOG_EXTINFO_STRING of table NXP_LOGS_EXTINFO is longer than the 255 characters.
2017-04-25 09:36:11,053 WARN [Nuxeo-Audit-Bulker] [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 22001 2017-04-25 09:36:11,053 ERROR [Nuxeo-Audit-Bulker] [org.hibernate.util.JDBCExceptionReporter] ERROR: value too long for type character varying(255) 2017-04-25 09:36:11,053 ERROR [Nuxeo-Audit-Bulker] [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.DataException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:100) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1028) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:304) at org.nuxeo.ecm.core.persistence.PersistenceProvider.doCommit(PersistenceProvider.java:101) at org.nuxeo.ecm.core.persistence.PersistenceProvider.releaseEntityManager(PersistenceProvider.java:130) at org.nuxeo.ecm.core.persistence.PersistenceProvider.run(PersistenceProvider.java:190) at org.nuxeo.ecm.platform.audit.service.DefaultAuditBackend.addLogEntries(DefaultAuditBackend.java:107) at org.nuxeo.ecm.platform.audit.service.DefaultAuditBulker.drain(DefaultAuditBulker.java:152) at org.nuxeo.ecm.platform.audit.service.DefaultAuditBulker$Consumer.run(DefaultAuditBulker.java:186) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into NXP_LOGS_EXTINFO (LOG_EXTINFO_STRING, DISCRIMINATOR, LOG_EXTINFO_ID) values ('https://xxxxxx-blob.s3.amazonaws.com/data/0b76ff5b4a6c539ff86826cd50acc40b?response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27Nuxeo%2520-%2520assetSERV%2520Proposal%252016%2520Feb.png&response-content-type=image%2Fpng&x-amz-security-token=XXXXXX&AWSAccessKeyId=XXXXXX&Expires=1493130971&Signature=XXXXXX%2FXXXXXX%3D', 'STRING', 1638471) was aborted: ERROR: value too long for type character varying(255) Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2156) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:460) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:793) at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1659) at org.tranql.connector.jdbc.StatementHandle.executeBatch(StatementHandle.java:155) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 13 more Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255) at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155) ... 19 more
- is related to
-
NXP-22340 nuxeoDriveVirtualEventLoggerListener can lead to a BatchUpdateException
- Open