@Transaction is unvaild in seata 1.5.1
See original GitHub issueⅠ. Issue Description
I created a new spring MVC + JPA project with only one table , one entity object and one service method to update the entity.After the functionality was fine, I introduced Seata, just by introducing dependencies to add seata configuration in YML, and my normal update entities became ineffective.I replaced Seata 1.5.1 with 1.4.2 and it worked fine again
Ⅱ. Describe what happened
Seata 1.4.2 log:
DEBUG i.s.i.http.TransactionPropagationIntercepter - xid in RootContext[null] xid in HttpContext[null]
TRACE o.h.internal.SessionFactoryImpl$SessionBuilderImpl - Opening Hibernate Session. tenant=null
TRACE org.hibernate.internal.SessionImpl - Opened Session [1fd305a2-01ee-48e7-b0d0-89a5e53725e8] at timestamp: 1655362180621
DEBUG o.h.engine.transaction.internal.TransactionImpl - On TransactionImpl creation, JpaCompliance#isJpaTransactionComplianceEnabled == false
DEBUG o.h.engine.transaction.internal.TransactionImpl - begin
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - Preparing to begin transaction via JDBC Connection.setAutoCommit(false)
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - Transaction begun via JDBC Connection.setAutoCommit(false)
TRACE o.h.r.t.b.j.i.JdbcResourceLocalTransactionCoordinatorImpl - ResourceLocalTransactionCoordinatorImpl#afterBeginCallback
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [com.example.demo1.service.BankAccountService.costValue]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.findById]
TRACE o.h.event.internal.DefaultLoadEventListener - Loading entity: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.event.internal.DefaultLoadEventListener - Attempting to resolve: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.event.internal.DefaultLoadEventListener - Object not resolved in any cache: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.persister.entity.AbstractEntityPersister - Fetching entity: [com.example.demo1.enitty.BankAccount#1]
DEBUG org.hibernate.SQL -
select
bankaccoun0_.`id` as id1_0_0_,
bankaccoun0_.`value` as value2_0_0_
from
`t_bank` bankaccoun0_
where
bankaccoun0_.`id`=?
[Hibernate]
select
bankaccoun0_.`id` as id1_0_0_,
bankaccoun0_.`value` as value2_0_0_
from
`t_bank` bankaccoun0_
where
bankaccoun0_.`id`=?
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Registering statement [io.seata.rm.datasource.PreparedStatementProxy@e560287]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Registering last query statement [io.seata.rm.datasource.PreparedStatementProxy@e560287]
TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [1] as [BIGINT] - [1]
TRACE o.h.l.p.exec.internal.AbstractLoadPlanBasedLoader - Bound [2] parameters total
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Registering result set [HikariProxyResultSet@172909791 wrapping com.mysql.cj.jdbc.result.ResultSetImpl@33b47d76]
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Processing result set
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Starting ResultSet row #0
DEBUG o.h.l.p.e.p.i.EntityReferenceInitializerImpl - On call to EntityIdentifierReaderImpl#resolve, EntityKey was already known; should only happen on root returns with an optional identifier specified
TRACE o.h.l.p.e.p.i.EntityReferenceInitializerImpl - hydrating entity state
TRACE o.h.l.p.e.p.i.EntityReferenceInitializerImpl - Initializing object from ResultSet: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.persister.entity.AbstractEntityPersister - Hydrating entity: [com.example.demo1.enitty.BankAccount#1]
TRACE org.hibernate.type.descriptor.sql.BasicExtractor - extracted value ([value2_0_0_] : [BIGINT]) - [999]
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Done processing result set (1 rows)
TRACE o.h.l.plan.exec.process.internal.AbstractRowReader - Total objects hydrated: 1
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Resolving attributes for [com.example.demo1.enitty.BankAccount#1]
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Processing attribute `value` : value = 999
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Attribute (`value`) - enhanced for lazy-loading? - false
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Done materializing entity [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.l.p.e.p.i.ResultSetProcessingContextImpl - Skipping create subselects because there are fewer than 2 results, so query by key is more efficient.
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing statement [io.seata.rm.datasource.PreparedStatementProxy@e560287]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Closing result set [HikariProxyResultSet@172909791 wrapping com.mysql.cj.jdbc.result.ResultSetImpl@33b47d76]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Closing prepared statement [io.seata.rm.datasource.PreparedStatementProxy@e560287]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.engine.internal.StatefulPersistenceContext - Initializing non-lazy collections
DEBUG o.h.l.e.plan.AbstractLoadPlanBasedEntityLoader - Done entity load : com.example.demo1.enitty.BankAccount#1
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.findById]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]
TRACE o.h.service.internal.AbstractServiceRegistryImpl - Initializing service [role=org.hibernate.event.spi.EntityCopyObserverFactory]
DEBUG o.h.e.internal.EntityCopyObserverFactoryInitiator - Configured EntityCopyObserver strategy: disallow
TRACE org.hibernate.event.internal.EntityState - Persistent instance of: com.example.demo1.enitty.BankAccount
TRACE o.h.event.internal.DefaultMergeEventListener - Ignoring persistent instance
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [com.example.demo1.service.BankAccountService.costValue]
DEBUG o.h.engine.transaction.internal.TransactionImpl - committing
TRACE o.h.r.t.b.j.i.JdbcResourceLocalTransactionCoordinatorImpl - ResourceLocalTransactionCoordinatorImpl#beforeCompletionCallback
TRACE org.hibernate.internal.SessionImpl - SessionImpl#beforeTransactionCompletion()
TRACE org.hibernate.internal.SessionImpl - Automatically flushing session
TRACE o.h.event.internal.AbstractFlushingEventListener - Flushing session
DEBUG o.h.event.internal.AbstractFlushingEventListener - Processing flush-time cascades
TRACE org.hibernate.engine.internal.Cascade - Processing cascade ACTION_PERSIST_ON_FLUSH for: com.example.demo1.enitty.BankAccount
TRACE org.hibernate.engine.internal.Cascade - Done processing cascade ACTION_PERSIST_ON_FLUSH for: com.example.demo1.enitty.BankAccount
DEBUG o.h.event.internal.AbstractFlushingEventListener - Dirty checking collections
TRACE o.h.event.internal.AbstractFlushingEventListener - Flushing entities and processing referenced collections
TRACE o.h.persister.entity.AbstractEntityPersister - com.example.demo1.enitty.BankAccount.value is dirty
TRACE o.h.event.internal.DefaultFlushEntityEventListener - Found dirty properties [[com.example.demo1.enitty.BankAccount#1]] : [value]
TRACE o.h.event.internal.DefaultFlushEntityEventListener - Updating entity: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.event.internal.AbstractFlushingEventListener - Processing unreferenced collections
TRACE o.h.event.internal.AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
DEBUG o.h.event.internal.AbstractFlushingEventListener - Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
DEBUG o.h.event.internal.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
DEBUG org.hibernate.internal.util.EntityPrinter - Listing entities:
DEBUG org.hibernate.internal.util.EntityPrinter - com.example.demo1.enitty.BankAccount{id=1, value=998}
TRACE o.h.event.internal.AbstractFlushingEventListener - Executing flush
TRACE o.h.persister.entity.AbstractEntityPersister - Updating entity: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.service.internal.AbstractServiceRegistryImpl - Initializing service [role=org.hibernate.engine.jdbc.batch.spi.BatchBuilder]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
DEBUG org.hibernate.SQL -
update
`t_bank`
set
`value`=?
where
`id`=?
[Hibernate]
update
`t_bank`
set
`value`=?
where
`id`=?
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Registering statement [io.seata.rm.datasource.PreparedStatementProxy@1b40530a]
TRACE o.h.persister.entity.AbstractEntityPersister - Dehydrating entity: [com.example.demo1.enitty.BankAccount#1]
TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [1] as [BIGINT] - [998]
TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [2] as [BIGINT] - [1]
DEBUG o.h.engine.jdbc.batch.internal.BatchingBatch - Executing batch size: 1
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing statement [io.seata.rm.datasource.PreparedStatementProxy@1b40530a]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Closing prepared statement [io.seata.rm.datasource.PreparedStatementProxy@1b40530a]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.event.internal.AbstractFlushingEventListener - Post flush
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - LogicalConnection#beforeTransactionCompletion
TRACE o.h.r.t.i.SynchronizationRegistryStandardImpl - SynchronizationRegistryStandardImpl.notifySynchronizationsBeforeTransactionCompletion
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - Preparing to commit transaction via JDBC Connection.commit()
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - Transaction committed via JDBC Connection.commit()
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - re-enabling auto-commit on JDBC Connection after completion of JDBC-based transaction
TRACE o.h.r.j.i.AbstractLogicalConnectionImplementor - LogicalConnection#afterTransaction
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing JDBC resources
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.r.t.b.j.i.JdbcResourceLocalTransactionCoordinatorImpl - ResourceLocalTransactionCoordinatorImpl#afterCompletionCallback(true)
TRACE o.h.r.t.i.SynchronizationRegistryStandardImpl - SynchronizationRegistryStandardImpl.notifySynchronizationsAfterTransactionCompletion(3)
TRACE org.hibernate.internal.SessionImpl - SessionImpl#afterTransactionCompletion(successful=true, delayed=false)
TRACE org.hibernate.internal.SessionImpl - Closing session [1fd305a2-01ee-48e7-b0d0-89a5e53725e8]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Closing JDBC container [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl@2fca9fde]
DEBUG o.h.engine.jdbc.internal.JdbcCoordinatorImpl - HHH000420: Closing un-released batch
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing JDBC resources
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.r.jdbc.internal.LogicalConnectionManagedImpl - Closing logical connection
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing JDBC resources
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.r.jdbc.internal.LogicalConnectionManagedImpl - Logical connection closed
Seata 1.5.1 log:
DEBUG i.s.i.http.TransactionPropagationInterceptor - xid in RootContext[null] xid in HttpContext[null]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [com.example.demo1.service.BankAccountService.costValue]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.findById]
TRACE o.h.internal.SessionFactoryImpl$SessionBuilderImpl - Opening Hibernate Session. tenant=null
TRACE org.hibernate.internal.SessionImpl - Opened Session [c6502c4b-3398-4ffa-93e3-add4219fde5d] at timestamp: 1655361689683
TRACE o.h.event.internal.DefaultLoadEventListener - Loading entity: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.event.internal.DefaultLoadEventListener - Attempting to resolve: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.event.internal.DefaultLoadEventListener - Object not resolved in any cache: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.persister.entity.AbstractEntityPersister - Fetching entity: [com.example.demo1.enitty.BankAccount#1]
DEBUG org.hibernate.SQL -
select
bankaccoun0_.`id` as id1_0_0_,
bankaccoun0_.`value` as value2_0_0_
from
`t_bank` bankaccoun0_
where
bankaccoun0_.`id`=?
[Hibernate]
select
bankaccoun0_.`id` as id1_0_0_,
bankaccoun0_.`value` as value2_0_0_
from
`t_bank` bankaccoun0_
where
bankaccoun0_.`id`=?
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Registering statement [HikariProxyPreparedStatement@1529529265 wrapping com.mysql.cj.jdbc.ClientPreparedStatement: select bankaccoun0_.`id` as id1_0_0_, bankaccoun0_.`value` as value2_0_0_ from `t_bank` bankaccoun0_ where bankaccoun0_.`id`=** NOT SPECIFIED **]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Registering last query statement [HikariProxyPreparedStatement@1529529265 wrapping com.mysql.cj.jdbc.ClientPreparedStatement: select bankaccoun0_.`id` as id1_0_0_, bankaccoun0_.`value` as value2_0_0_ from `t_bank` bankaccoun0_ where bankaccoun0_.`id`=** NOT SPECIFIED **]
TRACE org.hibernate.type.descriptor.sql.BasicBinder - binding parameter [1] as [BIGINT] - [1]
TRACE o.h.l.p.exec.internal.AbstractLoadPlanBasedLoader - Bound [2] parameters total
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Registering result set [HikariProxyResultSet@1133778629 wrapping com.mysql.cj.jdbc.result.ResultSetImpl@7a367521]
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Processing result set
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Starting ResultSet row #0
DEBUG o.h.l.p.e.p.i.EntityReferenceInitializerImpl - On call to EntityIdentifierReaderImpl#resolve, EntityKey was already known; should only happen on root returns with an optional identifier specified
TRACE o.h.l.p.e.p.i.EntityReferenceInitializerImpl - hydrating entity state
TRACE o.h.l.p.e.p.i.EntityReferenceInitializerImpl - Initializing object from ResultSet: [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.persister.entity.AbstractEntityPersister - Hydrating entity: [com.example.demo1.enitty.BankAccount#1]
TRACE org.hibernate.type.descriptor.sql.BasicExtractor - extracted value ([value2_0_0_] : [BIGINT]) - [999]
TRACE o.h.l.p.e.process.internal.ResultSetProcessorImpl - Done processing result set (1 rows)
TRACE o.h.l.plan.exec.process.internal.AbstractRowReader - Total objects hydrated: 1
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Resolving attributes for [com.example.demo1.enitty.BankAccount#1]
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Processing attribute `value` : value = 999
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Attribute (`value`) - enhanced for lazy-loading? - false
DEBUG org.hibernate.engine.internal.TwoPhaseLoad - Done materializing entity [com.example.demo1.enitty.BankAccount#1]
TRACE o.h.l.p.e.p.i.ResultSetProcessingContextImpl - Skipping create subselects because there are fewer than 2 results, so query by key is more efficient.
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing statement [HikariProxyPreparedStatement@1529529265 wrapping com.mysql.cj.jdbc.ClientPreparedStatement: select bankaccoun0_.`id` as id1_0_0_, bankaccoun0_.`value` as value2_0_0_ from `t_bank` bankaccoun0_ where bankaccoun0_.`id`=1]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Closing result set [HikariProxyResultSet@1133778629 wrapping com.mysql.cj.jdbc.result.ResultSetImpl@7a367521]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Closing prepared statement [HikariProxyPreparedStatement@1529529265 wrapping com.mysql.cj.jdbc.ClientPreparedStatement: select bankaccoun0_.`id` as id1_0_0_, bankaccoun0_.`value` as value2_0_0_ from `t_bank` bankaccoun0_ where bankaccoun0_.`id`=1]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Starting after statement execution processing [ON_CLOSE]
TRACE o.h.engine.internal.StatefulPersistenceContext - Initializing non-lazy collections
DEBUG o.h.l.e.plan.AbstractLoadPlanBasedEntityLoader - Done entity load : com.example.demo1.enitty.BankAccount#1
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.findById]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Getting transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]
TRACE o.h.service.internal.AbstractServiceRegistryImpl - Initializing service [role=org.hibernate.event.spi.EntityCopyObserverFactory]
DEBUG o.h.e.internal.EntityCopyObserverFactoryInitiator - Configured EntityCopyObserver strategy: disallow
TRACE org.hibernate.event.internal.EntityState - Persistent instance of: com.example.demo1.enitty.BankAccount
TRACE o.h.event.internal.DefaultMergeEventListener - Ignoring persistent instance
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [org.springframework.data.jpa.repository.support.SimpleJpaRepository.save]
TRACE o.s.transaction.interceptor.TransactionInterceptor - Completing transaction for [com.example.demo1.service.BankAccountService.costValue]
TRACE org.hibernate.internal.SessionImpl - Closing session [c6502c4b-3398-4ffa-93e3-add4219fde5d]
TRACE o.h.engine.jdbc.internal.JdbcCoordinatorImpl - Closing JDBC container [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl@65dc9df4]
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing JDBC resources
TRACE o.h.r.jdbc.internal.LogicalConnectionManagedImpl - Closing logical connection
TRACE o.h.r.jdbc.internal.ResourceRegistryStandardImpl - Releasing JDBC resources
TRACE o.h.r.jdbc.internal.LogicalConnectionManagedImpl - Logical connection closed
Ⅵ. Environment:
<properties>
<spring-boot.version>2.7.0</spring-boot.version>
<spring-cloud.version>2021.0.3</spring-cloud.version>
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
</properties>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>io.seata</groupId>-->
<!-- <artifactId>seata-spring-boot-starter</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.seata</groupId>-->
<!-- <artifactId>seata-spring-boot-starter</artifactId>-->
<!-- <version>1.5.1</version>-->
<!-- </dependency>-->
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Invalid Transactions - LeetCode
A transaction is possibly invalid if: the amount exceeds $1000 , or;; if it occurs within (and including) 60 minutes of another transaction...
Read more >Interlink Core Rules and Interlink Product and Service Rules
1.5.1 General Acquirer Requirements. 37. 1.5.2 Merchant Agreements ... 5.6.1 Transaction Receipt Data and Format Requirements.
Read more >Error "APP-FND-00806: The default value 1.5 is invalid for the ...
When attempting to create AR transaction using Brazilian localization, the following error occurs on transaction form pop up. ERROR ------------ ...
Read more >Invalid Transaction: Declined Code 12 Explained
There are a variety of reasons why your POS may fire a declined code 12, from fraud to incorrect information. Here's everything you...
Read more >Task: Seat Assignment - Pages - Support
This task allows the user to add new seats or change or delete existing seats in a PNR/BF. Section 1: Short Answer. Transaction...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have solved the problem. there are two problems in my demo for seata 1.5.1. The first is the SeataDataSourceAutoConfiguration is ignored, need to use
@EnableAutoDataSourceProxy
. The second problem is that the spring boot automatically configure TransactionManager, instantiate the JdbcTransactionManager, It is not JpaTransactionManager, so there is no local transaction commit.this configuration needs to be added:
TargetConnection.commit() will be executed if xid does not exist; why your connection commit failed is irrelevant to Seata