You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "JsonLYH (via GitHub)" <gi...@apache.org> on 2024/07/07 16:25:49 UTC
[I] ERROR o.s.j.d.DataSourceTransactionManager-Commit exception overridden by rollback exception [shardingsphere]
JsonLYH opened a new issue, #32031:
URL: https://github.com/apache/shardingsphere/issues/32031


### I configured the interceptor accordingly. It didn't work
@Configuration
@Slf4j
public class WebMVCConfig implements WebMvcConfigurer {
@Autowired
private LoginRequestInterceptor loginRequestInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(loginRequestInterceptor)
.addPathPatterns("/**");
registry.addInterceptor(new SeataFeignInterceptor()).addPathPatterns("/**");
}
@Bean
public ApiIdempotentInterceptor apiIdempotentInterceptor() {
return new ApiIdempotentInterceptor();
}
public static class SeataFeignInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String xid = RootContext.getXID();
if (xid == null) {
xid = request.getHeader(RootContext.KEY_XID);
if(xid == null) {
xid = request.getHeader("tx_xid");
}
}
if (!StringUtils.isBlank(xid) && SeataTransactionHolder.get() == null) {
RootContext.bind(xid);
SeataTransactionHolder.set(GlobalTransactionContext.getCurrentOrCreate());
}else if(!StringUtils.isBlank(xid)){
RootContext.bind(xid);
}
return true;
}
}
}
### The current version I'm using
sharding-jdbc-spring-boot-starter 4.1.1
sharding-transaction-base-seata-at 4.1.1
seata 2.0.0
**postman calls a microservice directly, which is normal and does not report an error, but calls through feign will report a null pointer exception, I confirm that tx_id has been passed normally**
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] ERROR o.s.j.d.DataSourceTransactionManager-Commit exception overridden by rollback exception [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #32031:
URL: https://github.com/apache/shardingsphere/issues/32031#issuecomment-2213278469
The version is out of service, please try new version.
--
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
Re: [I] ERROR o.s.j.d.DataSourceTransactionManager-Commit exception overridden by rollback exception [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #32031: ERROR o.s.j.d.DataSourceTransactionManager-Commit exception overridden by rollback exception
URL: https://github.com/apache/shardingsphere/issues/32031
--
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
Re: [I] ERROR o.s.j.d.DataSourceTransactionManager-Commit exception overridden by rollback exception [shardingsphere]
Posted by "shardcn (via GitHub)" <gi...@apache.org>.
shardcn commented on issue #32031:
URL: https://github.com/apache/shardingsphere/issues/32031#issuecomment-2413257717
you may write issues of version 4.1.1 here :https://gitee.com/shardcn/shardingsphere_4.1.1
--
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