glu
glu copied to clipboard
AuditLog should not fail
As reported in the forums: http://glu.977617.n3.nabble.com/Data-truncation-Data-too-long-for-column-details-tp4026939.html
2015/07/30 17:01:55.558 ERROR [GrailsExceptionResolver] MysqlDataTruncation occurred when processing request: [POST] /console/rest/v1/FABRIC_NAME_1/plan/844b3ce6-3922-4358-8b06-c86440a42135/execution
Data truncation: Data too long for column 'details' at row 1. Stacktrace follows:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'details' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3595)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.linkedin.glu.console.domain.AuditLog$_audit_closure1.doCall(AuditLog.groovy:63)
at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:687)
at org.linkedin.glu.console.domain.AuditLog.audit(AuditLog.groovy:62)
at org.linkedin.glu.console.domain.AuditLog.audit(AuditLog.groovy:82)
at org.linkedin.glu.console.domain.AuditLog.audit(AuditLog.groovy:110)
AuditLog should not fail when the data provided is too big to be recorded. It should at the very least truncate it.