funky-eyes commented on issue #7235: URL: https://github.com/apache/incubator-seata/issues/7235#issuecomment-2739770749
我只能说通过你提供的堆栈,你遇到的就是我上面发的pr锁修复的问题,看第一个BatchUpdateException,接着是SQLIntegrityConstraintViolationException,说明BatchUpdate的异常掩盖了SQLIntegrityConstraintViolationException ``` Caused by: java.sql.BatchUpdateException: Duplicate entry 'jdbc:mysql://127.0.0.1:3306/njdmsp2^^^operating_data^^^190235040' for key 'lock_table.PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_442] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_442] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_442] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_442] at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.util.Util.getInstance(Util.java:167) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.util.Util.getInstance(Util.java:174) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:800) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:565) ~[druid-1.2.7.jar:1.2.7] at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.doAcquireLocks(LockStoreDataBaseDAO.java:371) ~[classes!/:1.8.0] at io.seata.server.storage.db.lock.LockStoreDataBaseDAO.acquireLock(LockStoreDataBaseDAO.java:187) ~[classes!/:1.8.0] ... 24 common frames omitted Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'jdbc:mysql://127.0.0.1:3306/njdmsp2^^^operating_data^^^190235040' for key 'lock_table.PRIMARY' at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) ~[mysql-connector-java-8.0.27.jar:8.0.27] at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ~[mysql-connector-java-8.0.27.jar:8.0.27] ... 29 common frames omitted ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org