jav inserts Mysql data exception Data too long
exception information
2018-04-24 00:15:01 ERROR com.comall.cybershop.common.base.DaoSupport
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [update cs_awardCardReissue_batch set filePath = ? ,status = ? ,apiResult = ? ,statusLastModifyTime = ? ,queryApiResult = ? ,createTime = ? ,createUser = ? where id = ?]; Data truncation: Data too long for column "queryApiResult" at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column "queryApiResult" at row 1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:605)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:818)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:874)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:882)
at com.comall.cybershop.common.base.DaoSupport.update(DaoSupport.java:151)
at com.comall.cybershop.common.base.DaoSupport.update(DaoSupport.java:69)
at com.comall.cybershop.infrastructure.db.cardWallet.AwardCardReissueBatchDBStorageImpl.update(AwardCardReissueBatchDBStorageImpl.java:33)
at com.comall.cybershop.trade.awardCard.service.AwardCardReissueBatchServiceImpl.updateBatch(AwardCardReissueBatchServiceImpl.java:123)
at com.comall.cybershop.trade.awardCard.process.AwardCardReissueBatchProcess.execute(AwardCardReissueBatchProcess.java:123)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column "queryApiResult" at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4235)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2459)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2376)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2360)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2723)
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_executeUpdate(FilterAdapter.java:1069)
at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeUpdate(FilterEventAdapter.java:491)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeUpdate(FilterChainImpl.java:2721)
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeUpdate(PreparedStatementProxyImpl.java:158)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:253)
at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:824)
at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:818)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:589)
... 10 common frames omitted
description:
the queryApiResult in the program is the String type and the database is the Text type. Why is this still happening