Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23321

Allow longer value for column LOG_EXTINFO_STRING in table NXP_LOGS_EXTINFO

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 8.10-HF18, 9.3
    • Component/s: Audit
    • Backlog priority:
      500
    • Impact type:
      Data Persistence Change
    • Upgrade notes:
      Hide

      The LOG_EXTINFO_STRING column size has been extended to 1024 characters (255 previously).

      Show
      The LOG_EXTINFO_STRING column size has been extended to 1024 characters (255 previously).

      Description

      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
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h