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
1 Answer:
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
I tried running the query with mysql workbench and it works perfectly. I don't use any accent, just calling an stored procedure with an input string with comma-separated values series of numbers.
Thanks for your help