com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:

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

[quote]Caused by: java.sql.BatchUpdateException: Duplicate entry '3592030993-2011-11-23 19:22:45' for key 'PRIMARY' [/quote]

像asyty说的,报这个错,是有批量插入的时候才会出现的异常,不妨试试

主键冲突了,检查下数据库的数据,跟写入的数据吧

重复插入数据了吧, '3592030993-2011-11-23 19:22:45' for key 'PRIMARY',主键重复了

字符集的问题的可能性比较小。。。。。可能是java代码里在执行过程中数据冲突,你是数据库空的时候只插入一条数据出错的呢还是批量插入多条记录的时候出错的呢
能贴一点代码嚒

[quote]'3592030993-2011-11-23 19:22:45' for key 'PRIMARY' [/quote]
表结构是什么样子的, 这个值 好像是编号+ 时间????

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

你试着把主键去掉,看看数据能不能写进去