com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:

2019-03-25 13:45|来源: 网路

WEB系统报以下的错,是为什么?

Caused by: java.sql.BatchUpdateException: Duplicate entry '3592030993-2011-11-23 19:22:45' for key 'PRIMARY'
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
at weblogic.jdbc.wrapper.PreparedStatement.executeBatch(PreparedStatement.java:157)
at com.longshine.indigo.dbutils.manager.WrapperStatement.executeBatch(Unknown Source)
... 47 more
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '3592030993-2011-11-23 19:22:45' for key 'PRIMARY'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1036)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
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.executeBatchSerially(PreparedStatement.java:1976)
... 50 more



问题补充:
asyty 写道
重复插入数据了吧, '3592030993-2011-11-23 19:22:45' for key 'PRIMARY',主键重复了



数据库中的数据是空的,网上也找了资料说是字符集的问题,也试了,都不行

相关问答

更多