Quantcast

Data truncation: Data too long for column 'details'

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Data truncation: Data too long for column 'details'

hieti
Hello,

I have the following issue when using glu gradle plugin to orchestrate deployment with glu.

When calling start and stop action (from the gradle plugin for glu), the action is well executed  by the agent but we have the following exception on the glu console side :

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)

The GLU console version is : 5.5.1.

Any ideas ?

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Data truncation: Data too long for column 'details'

frenchyan
Administrator
I am not sure what you mean by the "gradle plugin for glu". glu does not come bundled with a gradle plugin, nor is there a specific gradle plugin for glu (officially). Are you using a plugin that somebody else wrote?

Whenever an action is executed, it gets logged in the audit log. From the exception, clearly the "details" column is too small to accomodate the details provided when executing the command. Can you check the table AUDIT_LOG in the mysql database to see what is the size allocated to this column? The "details" data is computed from various pieces of data provided during the rest call.

It seems to me that glu/console should not fail even if the data computed is too big and should at the very least truncate it.

That being said, this problem has never been reported (but from your exception clearly exists) so I am not too sure what this "plugin" you are talking about is doing to provide data that will generate a "details" information too big for the column.

Yan


On Thu, Jul 30, 2015 at 5:22 AM, hieti [via glu] <[hidden email]> wrote:
Hello,

I have the following issue when using glu gradle plugin to orchestrate deployment with glu.

When calling start and stop action (from the gradle plugin for glu), the action is well executed  by the agent but we have the following exception on the glu console side :

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)

The GLU console version is : 5.5.1.

Any ideas ?

Thanks


If you reply to this email, your message will be added to the discussion below:
http://glu.977617.n3.nabble.com/Data-truncation-Data-too-long-for-column-details-tp4026939.html
To start a new topic under glu, email [hidden email]
To unsubscribe from glu, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Data truncation: Data too long for column 'details'

frenchyan
Administrator
In reply to this post by hieti

​According to the grails documentation, a String gets mapped to a varchar(255). Can you verify?

Thanks
Yan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Data truncation: Data too long for column 'details'

hieti
The plugin am using is written by someone else : https://github.com/ghale/gradle-glu-plugin/wiki

That's right, the column 'details' type is varchar(255).

I am going the check the rest request of the plugin and the it provides.

Thanks,

hieti
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Data truncation: Data too long for column 'details'

frenchyan
Administrator
I have opened an issue for this problem: https://github.com/pongasoft/glu/issues/305 (AuditLog should not fail when data provided is too big to fit in the database).

It will be fixed on the next release of glu (which at the moment is not scheduled). 

In the meantime, I suggest you check with the author of the plugin what kind of data gets provided to glu that ends up generating a description that goes beyond 255 characters. You may also change the size of the column (I am not a database expert, but it may simply be possible to allocate a varchar(512) instead...)

Yan
Loading...