Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-33268

DVCS Data Truncation Error Should be More Descriptive

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      When attempting to Sync a GitHub respository with the DVCS connector the following stacktrace was seen:

      com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'MESSAGE' at row 1
      com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
      Database:
      	- name:MySQL
      	- version:5.5.29-0ubuntu1
      	- minor version:5
      	- major version:5
      Driver:
      	- name:MySQL Connector Java
      	- version:mysql-connector-java-5.1.25 ( Revision: ${bzr.revision-id} )
      
      com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'MESSAGE' at row 1
      	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:105)
      	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.create(DelegatingActiveObjects.java:61)
      ...
      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:4185)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2375)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2359)
      	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      
      • Strict Mode did not do anything as well.
      • Ultimately changing the datatype to 'LONGTEXT' solved this issue.
      Workaround

      The problem here was that the length of the message in the repository was beyond what the datatype "text" could receive (64k), so making this bigger solved the issue.

      ALTER TABLE 'AO_E8B6CC_CHANGESET_MAPPING' MODIFY MESSAGE LONGTEXT;
      

      Can we make this error more descriptive or possibly output the value that is too long in the logs, or even the frontend for the customer to easily understand?

              Unassigned Unassigned
              cshim ChrisA
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: