You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/17 02:42:30 UTC
[GitHub] [shardingsphere] jmbkeyes opened a new issue #12512: shardingsphere-jdbc with seata transaction issue
jmbkeyes opened a new issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Below is the demo code. The last save will not be successfully, for an exception(UnsupportedOperationException) is raised by the sharding algorithm.
1. sharding algorithm.
`
public class CenterIdPrecisionShardingAlgorithm implements StandardShardingAlgorithm<Long>{
@Override
public String doSharding(Collection<String> availableTargetNames, PreciseShardingValue<Long> shardingValue) {
String value = Consts.CENTERID_MAPPING.get(shardingValue.getValue());
if(null == value){
throw new UnsupportedOperationException();
}
return value;
}
@Override
public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Long> shardingValue) {
return null;
}
@Override
public void init() {
System.out.println('a');
}
@Override
public String getType() {
return "centerid";
}
@Override
public Properties getProps() {
return null;
}
@Override
public void setProps(Properties props) {
}
}
`
2. demo code.
`
@RequestMapping(value = "tci")
@Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(value = TransactionType.BASE)
public Object testTraineeCenterInfo() throws Exception {
TraineeCenterInfo tci = new TraineeCenterInfo();
tci.setCenterId(1L);
tci.setName("abc1");
tci.setId(1L);
traineeCenterInfoRepository.save(tci);
tci = new TraineeCenterInfo();
tci.setCenterId(2L);
tci.setName("abc2");
tci.setId(2L);
traineeCenterInfoRepository.save(tci);
tci = new TraineeCenterInfo();
tci.setCenterId(3L);
tci.setName("abc3");
tci.setId(3L);
traineeCenterInfoRepository.save(tci);
try {
tci = new TraineeCenterInfo();
tci.setCenterId(4L);
tci.setName("abc4");
tci.setId(4L);
traineeCenterInfoRepository.save(tci);
}catch(Exception ex){
throw new Exception("111");
}
return "ok";
}
`
3. shard rules.
`
rules:
sharding:
sharding-algorithms:
centerid-standard:
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.forzadata.bodytrack.shardingstrategy.database.CenterIdPrecisionShardingAlgorithm
tables:
trainee_center_info:
actual-data-nodes: bocaicheckin$->{2018..2020}.trainee_center_info
database-strategy:
standard:
sharding-column: centerId
sharding-algorithm-name: centerid-standard
table-strategy:
none:
props:
sql-show: true
`
4. logs.
2021-09-17 10:22:44.869 INFO 13428 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [192.168.150.1:8091:182075428110864384]
2021-09-17 10:22:45.645 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4]
2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4]
2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4]
2021-09-17 10:22:53.866 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : channel [id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091] read idle.
2021-09-17 10:22:53.867 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091]
2021-09-17 10:22:53.867 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.netty.NettyClientChannelManager : return to pool, rm channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : channel valid false,channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : channel inactive: [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : channel valid false,channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]
2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed
2021-09-17 10:22:53.871 INFO 13428 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : [192.168.150.1:8091:182075428110864384] commit status: Committed
2021-09-17 10:22:53.921 ERROR 13428 --- [nio-9090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Error while committing the transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction] with root cause
java.lang.RuntimeException: null
at com.forzadata.bodytrack.shardingstrategy.database.CenterIdPrecisionShardingAlgorithm.doSharding(CenterIdPrecisionShardingAlgorithm.java:16) ~[main/:na]
at org.apache.shardingsphere.sharding.algorithm.sharding.classbased.ClassBasedShardingAlgorithm.doSharding(ClassBasedShardingAlgorithm.java:87) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:68) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:57) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeDataSources(ShardingStandardRoutingEngine.java:203) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route0(ShardingStandardRoutingEngine.java:191) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(ShardingStandardRoutingEngine.java:114) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditions(ShardingStandardRoutingEngine.java:107) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.getDataNodes(ShardingStandardRoutingEngine.java:84) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:69) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:61) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:47) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:62) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:52) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:363) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:229) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3302) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3829) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:1.8.0_171]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:348) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1362) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:453) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3212) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2380) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:447) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:477) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.apache.shardingsphere.spring.transaction.ShardingTransactionTypeInterceptor.invoke(ShardingTransactionTypeInterceptor.java:44) ~[shardingsphere-jdbc-transaction-spring-5.0.0-beta.jar:5.0.0-beta]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.3.jar:5.3.3]
at com.forzadata.bodytrack.controller.TestController$$EnhancerBySpringCGLIB$$5756a5ca.testTraineeCenterInfo(<generated>) ~[main/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.0.0.5:3306/bocai_checkin2018,jdbc:mysql://10.0.0.5:3306/bocai_checkin2020,jdbc:mysql://10.0.0.5:3306/bocai_checkin2019
2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:127.0.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018,jdbc:mysql://10.0.0.5:3306/bocai_checkin2020,jdbc:mysql://10.0.0.5:3306/bocai_checkin2019', applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-17 10:23:25.132 INFO 13428 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x585cd576, L:/127.0.0.1:28558 - R:/127.0.0.1:8091]
2021-09-17 10:23:25.132 INFO 13428 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 4 ms, version:1.4.1,role:RMROLE,channel:[id: 0x585cd576, L:/127.0.0.1:28558 - R:/127.0.0.1:8091]
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
5.0beta
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
All should be rollback.
### Actual behavior
First 3 records are successfully saved.
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921634599
@zjcnb thanks for your help!
```java
package com.forzadata.bodytrack.consts;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
public final class Consts {
public static final Map<Long, String> CENTERID_MAPPING = new HashMap<Long, String>(){{
put(1L, "bocaicheckin2018");
put(2L, "bocaicheckin2019");
put(3L, "bocaicheckin2020");
}};
}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924811943
@zjcnb Today I came across a new issue when run the test(comment the last save in try_catch block), NPE was throw. But I'm it works well before Mid-autumn festival.
below are logs.
```
"C:\Program Files\Java\jdk1.8.0_171\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:21832,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\groovyHotSwap\gragent.jar -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\mjiang\AppData\Local\Temp\classpath272380763.jar com.forzadata.bodytrack.Application
Connected to the target VM, address: '127.0.0.1:21832', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.2)
2021-09-22 18:36:27.392 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Starting Application using Java 1.8.0_171 on DESKTOP-ITLFH7C with PID 11796 (E:\shardingsphere-jdbc-seata-demo\build\classes\java\main started by mjiang in E:\shardingsphere-jdbc-seata-demo)
2021-09-22 18:36:27.395 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : No active profile set, falling back to default profiles: default
2021-09-22 18:36:28.074 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-09-22 18:36:28.128 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46 ms. Found 1 JPA repository interfaces.
2021-09-22 18:36:28.503 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'stringToNoneShardingStrategyConfigurationConverter' of type [org.apache.shardingsphere.spring.boot.converter.StringToNoneShardingStrategyConfigurationConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.507 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.shardingsphere-org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration' of type [org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.761 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration' of type [org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$e0c6e480] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:29.043 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
2021-09-22 18:36:29.053 INFO 11796 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-09-22 18:36:29.054 INFO 11796 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-09-22 18:36:29.146 INFO 11796 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-09-22 18:36:29.147 INFO 11796 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1519 ms
2021-09-22 18:36:29.257 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-09-22 18:36:29.399 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-09-22 18:36:29.411 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Starting...
2021-09-22 18:36:29.421 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Start completed.
2021-09-22 18:36:30.272 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is seata.conf
2021-09-22 18:36:30.274 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is seata.conf
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is registry
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is /E:/shardingsphere-jdbc-seata-demo/build/resources/main/registry.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is file.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is file.conf
2021-09-22 18:36:30.484 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.490 INFO 11796 --- [ main] io.seata.rm.datasource.AsyncWorker : Async Commit Buffer Limit: 10000
2021-09-22 18:36:30.490 INFO 11796 --- [ main] i.s.rm.datasource.xa.ResourceManagerXA : ResourceManagerXA init ...
2021-09-22 18:36:30.496 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.541 INFO 11796 --- [ main] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:36:30.542 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.0.0.5:3306/bocai_checkin2018
2021-09-22 18:36:30.544 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:127.0.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:36:31.188 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.194 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 82 ms, version:1.4.1,role:RMROLE,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.197 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2019
2021-09-22 18:36:31.198 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2020
2021-09-22 18:36:31.199 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.200 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.298 INFO 11796 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-09-22 18:36:31.339 INFO 11796 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.27.Final
2021-09-22 18:36:31.455 INFO 11796 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-09-22 18:36:31.701 INFO 11796 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
2021-09-22 18:36:32.137 INFO 11796 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-09-22 18:36:32.146 INFO 11796 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-09-22 18:36:32.437 WARN 11796 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-09-22 18:36:32.609 INFO 11796 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-09-22 18:36:32.879 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9090 (http) with context path ''
2021-09-22 18:36:32.887 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Started Application in 5.875 seconds (JVM running for 6.747)
2021-09-22 18:37:24.323 INFO 11796 --- [nio-9090-exec-1] o.apache.tomcat.util.http.parser.Cookie : A cookie header was received [1631779686,1631862467] that contained an invalid cookie. That cookie will be ignored.
Note: further occurrences of this error will be logged at DEBUG level.
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-09-22 18:37:24.332 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2021-09-22 18:37:24.371 INFO 11796 --- [nio-9090-exec-1] io.seata.tm.TransactionManagerHolder : TransactionManager Singleton io.seata.tm.DefaultTransactionManager@6811e54
2021-09-22 18:37:24.376 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:37:24.378 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:127.0.0.1:8091,msg:< RegisterTMRequest{applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 6 ms, version:1.4.1,role:TMROLE,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.437 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [172.19.176.1:8091:184011852433330176]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.241 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : [172.19.176.1:8091:184011852433330176] commit status: Committed
2021-09-22 18:37:25.262 ERROR 11796 --- [nio-9090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Error while committing the transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction] with root cause
java.lang.NullPointerException: null
at org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingTransactionManager.commit(SeataATShardingTransactionManager.java:109) ~[shardingsphere-transaction-base-seata-at-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.commit(ShardingSphereConnection.java:265) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.commit(AbstractLogicalConnectionImplementor.java:86) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:282) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:477) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.apache.shardingsphere.spring.transaction.ShardingTransactionTypeInterceptor.invoke(ShardingTransactionTypeInterceptor.java:44) ~[shardingsphere-jdbc-transaction-spring-5.0.0-beta.jar:5.0.0-beta]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.3.jar:5.3.3]
at com.forzadata.bodytrack.controller.TestController$$EnhancerBySpringCGLIB$$1556f34d.testTraineeCenterInfo(<generated>) ~[main/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_1_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_2_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2020', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_3_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2019', saveDays=7, branchType=AT}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924772782
@zjcnb any feedback?
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924813899
@jmbkeyes Sorry, i will give you feedback later
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924811943
@zjcnb Today I came across a new issue when run the test(comment the last save), NPE was thrown。logs as below.
```
"C:\Program Files\Java\jdk1.8.0_171\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:21832,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\groovyHotSwap\gragent.jar -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\mjiang\AppData\Local\Temp\classpath272380763.jar com.forzadata.bodytrack.Application
Connected to the target VM, address: '127.0.0.1:21832', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.2)
2021-09-22 18:36:27.392 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Starting Application using Java 1.8.0_171 on DESKTOP-ITLFH7C with PID 11796 (E:\shardingsphere-jdbc-seata-demo\build\classes\java\main started by mjiang in E:\shardingsphere-jdbc-seata-demo)
2021-09-22 18:36:27.395 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : No active profile set, falling back to default profiles: default
2021-09-22 18:36:28.074 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-09-22 18:36:28.128 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46 ms. Found 1 JPA repository interfaces.
2021-09-22 18:36:28.503 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'stringToNoneShardingStrategyConfigurationConverter' of type [org.apache.shardingsphere.spring.boot.converter.StringToNoneShardingStrategyConfigurationConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.507 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.shardingsphere-org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration' of type [org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.761 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration' of type [org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$e0c6e480] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:29.043 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
2021-09-22 18:36:29.053 INFO 11796 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-09-22 18:36:29.054 INFO 11796 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-09-22 18:36:29.146 INFO 11796 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-09-22 18:36:29.147 INFO 11796 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1519 ms
2021-09-22 18:36:29.257 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-09-22 18:36:29.399 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-09-22 18:36:29.411 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Starting...
2021-09-22 18:36:29.421 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Start completed.
2021-09-22 18:36:30.272 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is seata.conf
2021-09-22 18:36:30.274 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is seata.conf
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is registry
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is /E:/shardingsphere-jdbc-seata-demo/build/resources/main/registry.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is file.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is file.conf
2021-09-22 18:36:30.484 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.490 INFO 11796 --- [ main] io.seata.rm.datasource.AsyncWorker : Async Commit Buffer Limit: 10000
2021-09-22 18:36:30.490 INFO 11796 --- [ main] i.s.rm.datasource.xa.ResourceManagerXA : ResourceManagerXA init ...
2021-09-22 18:36:30.496 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.541 INFO 11796 --- [ main] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:36:30.542 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.0.0.5:3306/bocai_checkin2018
2021-09-22 18:36:30.544 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:127.0.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:36:31.188 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.194 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 82 ms, version:1.4.1,role:RMROLE,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.197 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2019
2021-09-22 18:36:31.198 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2020
2021-09-22 18:36:31.199 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.200 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.298 INFO 11796 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-09-22 18:36:31.339 INFO 11796 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.27.Final
2021-09-22 18:36:31.455 INFO 11796 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-09-22 18:36:31.701 INFO 11796 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
2021-09-22 18:36:32.137 INFO 11796 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-09-22 18:36:32.146 INFO 11796 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-09-22 18:36:32.437 WARN 11796 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-09-22 18:36:32.609 INFO 11796 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-09-22 18:36:32.879 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9090 (http) with context path ''
2021-09-22 18:36:32.887 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Started Application in 5.875 seconds (JVM running for 6.747)
2021-09-22 18:37:24.323 INFO 11796 --- [nio-9090-exec-1] o.apache.tomcat.util.http.parser.Cookie : A cookie header was received [1631779686,1631862467] that contained an invalid cookie. That cookie will be ignored.
Note: further occurrences of this error will be logged at DEBUG level.
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-09-22 18:37:24.332 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2021-09-22 18:37:24.371 INFO 11796 --- [nio-9090-exec-1] io.seata.tm.TransactionManagerHolder : TransactionManager Singleton io.seata.tm.DefaultTransactionManager@6811e54
2021-09-22 18:37:24.376 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:37:24.378 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:127.0.0.1:8091,msg:< RegisterTMRequest{applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 6 ms, version:1.4.1,role:TMROLE,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.437 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [172.19.176.1:8091:184011852433330176]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.241 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : [172.19.176.1:8091:184011852433330176] commit status: Committed
2021-09-22 18:37:25.262 ERROR 11796 --- [nio-9090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Error while committing the transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction] with root cause
java.lang.NullPointerException: null
at org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingTransactionManager.commit(SeataATShardingTransactionManager.java:109) ~[shardingsphere-transaction-base-seata-at-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.commit(ShardingSphereConnection.java:265) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.commit(AbstractLogicalConnectionImplementor.java:86) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:282) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:477) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.apache.shardingsphere.spring.transaction.ShardingTransactionTypeInterceptor.invoke(ShardingTransactionTypeInterceptor.java:44) ~[shardingsphere-jdbc-transaction-spring-5.0.0-beta.jar:5.0.0-beta]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.3.jar:5.3.3]
at com.forzadata.bodytrack.controller.TestController$$EnhancerBySpringCGLIB$$1556f34d.testTraineeCenterInfo(<generated>) ~[main/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_1_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_2_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2020', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_3_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2019', saveDays=7, branchType=AT}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921638435
> @zjcnb thanks for your help!
>
> ```java
> package com.forzadata.bodytrack.consts;
>
> import java.util.Collection;
> import java.util.HashMap;
> import java.util.Map;
>
> public final class Consts {
> public static final Map<Long, String> CENTERID_MAPPING = new HashMap<Long, String>(){{
> put(1L, "bocaicheckin2018");
> put(2L, "bocaicheckin2019");
> put(3L, "bocaicheckin2020");
> }};
> }
> ```
bingo
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921634599
@zjcnb thanks for your help!
```
package com.forzadata.bodytrack.shardingstrategy.database;
import com.forzadata.bodytrack.consts.Consts;
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
import java.util.Collection;
import java.util.Properties;
public class CenterIdPrecisionShardingAlgorithm implements StandardShardingAlgorithm<Long>{
@Override
public String doSharding(Collection<String> availableTargetNames, PreciseShardingValue<Long> shardingValue) {
String value = Consts.CENTERID_MAPPING.get(shardingValue.getValue());
if(null == value){
throw new UnsupportedOperationException();
}
return value;
}
@Override
public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Long> shardingValue) {
return null;
}
@Override
public void init() {
System.out.println('a');
}
@Override
public String getType() {
return "centerid";
}
@Override
public Properties getProps() {
return null;
}
@Override
public void setProps(Properties props) {
}
}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921634599
@zjcnb
```
public final class Consts {
public static final Map<Long, String> CENTERID_MAPPING = new HashMap<Long, String>(){{
put(1L, "bocaicheckin2018");
put(2L, "bocaicheckin2019");
put(3L, "bocaicheckin2020");
}};
}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921627907
@jmbkeyes Hi, please provider your Consts.CENTERID_MAPPING class
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #12512: shardingsphere-jdbc with seata1.4.1 transaction issue
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-927264453
The seata version of ShardingSphere is 1.0.0, it is better to upgrade the version, please see #12739.
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #12512: shardingsphere-jdbc with seata1.4.1 transaction issue
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924811943
@zjcnb Today I came across a new issue when run the test(comment the last save in try_catch block), NPE was throw. But it works well before Mid-autumn festival.
below are logs.
```
"C:\Program Files\Java\jdk1.8.0_171\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:21832,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\groovyHotSwap\gragent.jar -javaagent:C:\Users\mjiang\AppData\Local\JetBrains\IntelliJIdea2020.2\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\mjiang\AppData\Local\Temp\classpath272380763.jar com.forzadata.bodytrack.Application
Connected to the target VM, address: '127.0.0.1:21832', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.2)
2021-09-22 18:36:27.392 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Starting Application using Java 1.8.0_171 on DESKTOP-ITLFH7C with PID 11796 (E:\shardingsphere-jdbc-seata-demo\build\classes\java\main started by mjiang in E:\shardingsphere-jdbc-seata-demo)
2021-09-22 18:36:27.395 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : No active profile set, falling back to default profiles: default
2021-09-22 18:36:28.074 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-09-22 18:36:28.128 INFO 11796 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46 ms. Found 1 JPA repository interfaces.
2021-09-22 18:36:28.503 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'stringToNoneShardingStrategyConfigurationConverter' of type [org.apache.shardingsphere.spring.boot.converter.StringToNoneShardingStrategyConfigurationConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.507 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.shardingsphere-org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration' of type [org.apache.shardingsphere.spring.boot.prop.SpringBootPropertiesConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:28.761 INFO 11796 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration' of type [org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration$$EnhancerBySpringCGLIB$$e0c6e480] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-09-22 18:36:29.043 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
2021-09-22 18:36:29.053 INFO 11796 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-09-22 18:36:29.054 INFO 11796 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-09-22 18:36:29.146 INFO 11796 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-09-22 18:36:29.147 INFO 11796 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1519 ms
2021-09-22 18:36:29.257 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-09-22 18:36:29.399 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-09-22 18:36:29.411 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
2021-09-22 18:36:29.417 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Starting...
2021-09-22 18:36:29.421 INFO 11796 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-3 - Start completed.
2021-09-22 18:36:30.272 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is seata.conf
2021-09-22 18:36:30.274 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is seata.conf
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is registry
2021-09-22 18:36:30.323 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is /E:/shardingsphere-jdbc-seata-demo/build/resources/main/registry.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The file name of the operation is file.conf
2021-09-22 18:36:30.331 INFO 11796 --- [ main] io.seata.config.FileConfiguration : The configuration file used is file.conf
2021-09-22 18:36:30.484 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.490 INFO 11796 --- [ main] io.seata.rm.datasource.AsyncWorker : Async Commit Buffer Limit: 10000
2021-09-22 18:36:30.490 INFO 11796 --- [ main] i.s.rm.datasource.xa.ResourceManagerXA : ResourceManagerXA init ...
2021-09-22 18:36:30.496 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyClientBootstrap : NettyClientBootstrap has started
2021-09-22 18:36:30.541 INFO 11796 --- [ main] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:36:30.542 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.0.0.5:3306/bocai_checkin2018
2021-09-22 18:36:30.544 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:127.0.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:36:31.188 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.194 INFO 11796 --- [ main] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 82 ms, version:1.4.1,role:RMROLE,channel:[id: 0x27703058, L:/127.0.0.1:21873 - R:/127.0.0.1:8091]
2021-09-22 18:36:31.197 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2019
2021-09-22 18:36:31.198 INFO 11796 --- [ main] i.s.c.rpc.netty.RmNettyRemotingClient : will register resourceId:jdbc:mysql://10.0.0.5:3306/bocai_checkin2020
2021-09-22 18:36:31.199 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.200 INFO 11796 --- [ctor_RMROLE_1_1] io.seata.rm.AbstractRMHandler : the rm client received response msg [version=1.4.1,extraData=null,identified=true,resultCode=null,msg=null] from tc server.
2021-09-22 18:36:31.298 INFO 11796 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-09-22 18:36:31.339 INFO 11796 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.27.Final
2021-09-22 18:36:31.455 INFO 11796 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-09-22 18:36:31.701 INFO 11796 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
2021-09-22 18:36:32.137 INFO 11796 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-09-22 18:36:32.146 INFO 11796 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-09-22 18:36:32.437 WARN 11796 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-09-22 18:36:32.609 INFO 11796 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-09-22 18:36:32.879 INFO 11796 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9090 (http) with context path ''
2021-09-22 18:36:32.887 INFO 11796 --- [ main] com.forzadata.bodytrack.Application : Started Application in 5.875 seconds (JVM running for 6.747)
2021-09-22 18:37:24.323 INFO 11796 --- [nio-9090-exec-1] o.apache.tomcat.util.http.parser.Cookie : A cookie header was received [1631779686,1631862467] that contained an invalid cookie. That cookie will be ignored.
Note: further occurrences of this error will be logged at DEBUG level.
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-09-22 18:37:24.331 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-09-22 18:37:24.332 INFO 11796 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2021-09-22 18:37:24.371 INFO 11796 --- [nio-9090-exec-1] io.seata.tm.TransactionManagerHolder : TransactionManager Singleton io.seata.tm.DefaultTransactionManager@6811e54
2021-09-22 18:37:24.376 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091
2021-09-22 18:37:24.378 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:127.0.0.1:8091,msg:< RegisterTMRequest{applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} >
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.387 INFO 11796 --- [Send_TMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 6 ms, version:1.4.1,role:TMROLE,channel:[id: 0x77db9c55, L:/127.0.0.1:1038 - R:/127.0.0.1:8091]
2021-09-22 18:37:24.437 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [172.19.176.1:8091:184011852433330176]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.143 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.226 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=?
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty)
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.230 INFO 11796 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3]
2021-09-22 18:37:25.241 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : [172.19.176.1:8091:184011852433330176] commit status: Committed
2021-09-22 18:37:25.262 ERROR 11796 --- [nio-9090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Error while committing the transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction] with root cause
java.lang.NullPointerException: null
at org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingTransactionManager.commit(SeataATShardingTransactionManager.java:109) ~[shardingsphere-transaction-base-seata-at-5.0.0-beta.jar:5.0.0-beta]
at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.commit(ShardingSphereConnection.java:265) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]
at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.commit(AbstractLogicalConnectionImplementor.java:86) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:282) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final]
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:477) ~[spring-orm-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.apache.shardingsphere.spring.transaction.ShardingTransactionTypeInterceptor.invoke(ShardingTransactionTypeInterceptor.java:44) ~[shardingsphere-jdbc-transaction-spring-5.0.0-beta.jar:5.0.0-beta]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.3.jar:5.3.3]
at com.forzadata.bodytrack.controller.TestController$$EnhancerBySpringCGLIB$$1556f34d.testTraineeCenterInfo(<generated>) ~[main/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_1_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_2_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2020', saveDays=7, branchType=AT}
2021-09-22 18:39:20.183 INFO 11796 --- [h_RMROLE_1_3_24] i.s.c.r.p.client.RmUndoLogProcessor : rm handle undo log process:UndoLogDeleteRequest{resourceId='jdbc:mysql://10.0.0.5:3306/bocai_checkin2019', saveDays=7, branchType=AT}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-922728447
@jmbkeyes Hi, if this one was fixed, could you close it?
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes commented on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-924513734
@tristaZero It's not fixed yet.
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921634599
@zjcnb thanks for your help!
```java
package com.forzadata.bodytrack.shardingstrategy.database;
import com.forzadata.bodytrack.consts.Consts;
import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
import java.util.Collection;
import java.util.Properties;
public class CenterIdPrecisionShardingAlgorithm implements StandardShardingAlgorithm<Long>{
@Override
public String doSharding(Collection<String> availableTargetNames, PreciseShardingValue<Long> shardingValue) {
String value = Consts.CENTERID_MAPPING.get(shardingValue.getValue());
if(null == value){
throw new UnsupportedOperationException();
}
return value;
}
@Override
public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Long> shardingValue) {
return null;
}
@Override
public void init() {
System.out.println('a');
}
@Override
public String getType() {
return "centerid";
}
@Override
public Properties getProps() {
return null;
}
@Override
public void setProps(Properties props) {
}
}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes edited a comment on issue #12512: shardingsphere-jdbc with seata transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes edited a comment on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-921634599
@zjcnb thanks for your help!
```
public final class Consts {
public static final Map<Long, String> CENTERID_MAPPING = new HashMap<Long, String>(){{
put(1L, "bocaicheckin2018");
put(2L, "bocaicheckin2019");
put(3L, "bocaicheckin2020");
}};
}
```
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] jmbkeyes commented on issue #12512: shardingsphere-jdbc with seata1.4.1 transaction issue
Posted by GitBox <gi...@apache.org>.
jmbkeyes commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-964759483
Since 5.0.0 is released, I upgrade the shardingshphere to 5.0.0 for my demo project(https://github.com/jmbkeyes/shardingsphere-jdbc-seata-demo.git), and then test the api with global seata transaction.
It seems that seata transaction doesn't triggered for there's no message like below.
2021-09-22 18:37:24.437 INFO 11796 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [172.19.176.1:8091:184011852433330176]
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #12512: shardingsphere-jdbc with seata1.4.1 transaction issue
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #12512:
URL: https://github.com/apache/shardingsphere/issues/12512#issuecomment-968720977
Thanks for @jmbkeyes feedback. @jingshanglu we need a look here.
--
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-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org