Jump to content

MysqlDataTruncation: Data truncation: Data too long for column


anyulled

Recommended Posts

i'm trying to configure a jaspersoft report at jasperserver with several text input controls. When I try with short values the report displays successfully.

 

But when i pass a long string input value, the server returns an error filling the report:

 

com.jaspersoft.jasperserver.api.JSException: Error filling report

 

Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'canales' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3607) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:239) ... 15 more

 

 

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'canales' at row 1
 
Traza de error
 
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'canales' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3607) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

That has nothing to do with Jasper it is a MySQL Server error when it tries to run the query with the value you provided, have you tried running the query using the same input (long values) on MySQL directly? 

It may be also a known issue in MySQL with some special character (maybe acentos en español?) see this MySQL bug report http://bugs.mysql.com/bug.php?id=18908 and also this thread http://forums.mysql.com/read.php?103,51906,51906#msg-51906

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...