apache / apache/incubator-seata
Caused by: com.esotericsoftware.kryo.KryoException: Class cannot be created (missing no-arg constructor): java.time.LocalDateTime
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
1、新增完订单后,成功。
2、测试余额不足情况
3、事务回滚
4、io.seata.core.exception.BranchTransactionException: Branch session rollback failed and try again later xid = 192.168.43.131:8091:5935898758734508221 branchId = 5935898758734508223 Class cannot be created (missing no-arg constructor): java.time.LocalDateTime
Serialization trace:
value (io.seata.rm.datasource.sql.struct.Field)
fields (io.seata.rm.datasource.sql.struct.Row)
rows (io.seata.rm.datasource.sql.struct.TableRecords)
afterImage (io.seata.rm.datasource.undo.SQLUndoLog)
sqlUndoLogs (io.seata.rm.datasource.undo.BranchUndoLog)
at io.seata.rm.datasource.undo.AbstractUndoLogManager.undo(AbstractUndoLogManager.java:339)
at io.seata.rm.datasource.DataSourceManager.branchRollback(DataSourceManager.java:178)
at io.seata.rm.AbstractRMHandler.doBranchRollback(AbstractRMHandler.java:125)
at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:67)
at io.seata.rm.AbstractRMHandler$2.execute(AbstractRMHandler.java:63)
at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:116)
at io.seata.rm.AbstractRMHandler.handle(AbstractRMHandler.java:63)
at io.seata.rm.DefaultRMHandler.handle(DefaultRMHandler.java:63)
at io.seata.core.protocol.transaction.BranchRollbackRequest.handle(BranchRollbackRequest.java:35)
at io.seata.rm.AbstractRMHandler.onRequest(AbstractRMHandler.java:150)
at io.seata.core.rpc.processor.client.RmBranchRollbackProcessor.handleBranchRollback(RmBranchRollbackProcessor.java:63)
at io.seata.core.rpc.processor.client.RmBranchRollbackProcessor.process(RmBranchRollbackProcessor.java:58)
at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.esotericsoftware.kryo.KryoException: Class cannot be created (missing no-arg constructor): java.time.LocalDateTime
Contributor guide
Research direction
Start with the rollback path in io.seata.rm.datasource.undo.AbstractUndoLogManager.undo and the callers shown in DataSourceManager.branchRollback and AbstractRMHandler.doBranchRollback. Reproduce the insufficient-balance transaction using a java.time.LocalDateTime value, then trace how the undo-log rows reach Kryo. Done means the branch rollback no longer fails with the reported LocalDateTime constructor exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100