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/10/22 10:43:57 UTC

[GitHub] [shardingsphere] zkxihua opened a new issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

zkxihua opened a new issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228


   sharding-jdbc.version :4.0.0-RC2
   
   sql:update sku set version = version + 1, lock_stock = lock_stock - 1, sales_num = sales_num + 1, update_time = 1634890932671  where id = '6172713fca31ea641a495081' and lock_stock >= 1 
   
   
   配置:
   @Bean
       @Primary
       @DependsOn({ "druidMasterDataSourece", "druidSlave0DataSourece","druidSlave1DataSourece"})
       public DataSource getMasterSlaveDataSource(){
           MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration("ds_master_slave", "ds_master", Arrays.asList("ds_slave0","ds_slave1"));
           DataSource dataSource = null;
           try {
               dataSource = MasterSlaveDataSourceFactory.createDataSource(createDataSourceMap(), masterSlaveRuleConfig, new Properties());
           } catch (SQLException e) {
               throw new IllegalStateException(e);
           }
           return dataSource;
       }
   
   
   error:
   Could not commit JDBC transaction; nested exception is java.sql.SQLException ([100000])
   org.springframework.transaction.TransactionSystemException: Could not commit JDBC transaction; nested exception is java.sql.SQLException
   	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCommit(DataSourceTransactionManager.java:332)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:746)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:534)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:305)
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
   	at com.shopshops.ms.merchandise.maneger.impl.MerchandisesManagerImpl$$EnhancerBySpringCGLIB$$7d75236f.updateSkuStockReal(<generated>)
   	at com.shopshops.ms.merchandise.maneger.impl.MerchandisesManagerImpl.updateSkuStock(MerchandisesManagerImpl.java:146)
   	at com.shopshops.ms.merchandise.maneger.impl.MerchandisesManagerImpl$$FastClassBySpringCGLIB$$3d364273.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
   	at com.shopshops.ms.merchandise.maneger.impl.MerchandisesManagerImpl$$EnhancerBySpringCGLIB$$7d75236f.updateSkuStock(<generated>)
   	at com.shopshops.ms.merchandise.facade.impl.MerchandiseController.updateSkuStock(MerchandiseController.java:160)
   	at com.shopshops.ms.merchandise.facade.impl.MerchandiseController$$FastClassBySpringCGLIB$$7bcfb706.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
   	at com.shopshops.ms.merchandise.facade.impl.aop.FacadeControllerAspect.aroundMethod(FacadeControllerAspect.java:57)
   	at sun.reflect.GeneratedMethodAccessor553.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
   	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
   	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
   	at com.shopshops.ms.merchandise.facade.impl.MerchandiseController$$EnhancerBySpringCGLIB$$a4e21ed1.updateSkuStock(<generated>)
   	at sun.reflect.GeneratedMethodAccessor3731.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
   	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
   	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
   	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
   	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
   	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
   	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
   	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
   	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
   	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
   	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at com.kaffatech.mocha.dsuite.sharding.jdbc.TransmitMasterRouteFilter.doFilter(TransmitMasterRouteFilter.java:35)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.cloud.sleuth.instrument.web.ExceptionLoggingFilter.doFilter(ExceptionLoggingFilter.java:50)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at brave.servlet.TracingFilter.doFilter(TracingFilter.java:86)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117)
   	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
   	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
   	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
   	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
   	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
   	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
   	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
   	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
   	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
   	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
   	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
   	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
   	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747)
   	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: java.sql.SQLException: null
   	at org.apache.shardingsphere.shardingjdbc.jdbc.adapter.executor.ForceExecuteTemplate.throwSQLExceptionIfNecessary(ForceExecuteTemplate.java:56)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.adapter.executor.ForceExecuteTemplate.execute(ForceExecuteTemplate.java:49)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.adapter.AbstractConnectionAdapter.commit(AbstractConnectionAdapter.java:183)
   	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCommit(DataSourceTransactionManager.java:329)


-- 
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] lanchengx removed a comment on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
lanchengx removed a comment on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-949643714


   Sorry, we may need more specific information to locate the error


-- 
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] lanchengx commented on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
lanchengx commented on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-949643714


   Sorry, we may need more specific information to locate the error


-- 
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] TeslaCN commented on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-1074882447


   Close due to no response.


-- 
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] TeslaCN commented on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-951520265


   Hi @zkxihua 
   For English only. The `4.0.0-RC2` is no longer maintained, please consider trying the latest version or compiling`master` branch.


-- 
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] zkxihua commented on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
zkxihua commented on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-950609486


   您好,没有更多的报错信息了。5.0.0 不是没有 GA版本的吗,rc版本 解决了这个问题吗?
   如果还有其它信息,就是 用了 seata的 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] TeslaCN closed issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228


   


-- 
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] lanchengx commented on issue #13228: Could not commit JDBC transaction; nested exception is java.sql.SQLException "Caused by: java.sql.SQLException: null"

Posted by GitBox <gi...@apache.org>.
lanchengx commented on issue #13228:
URL: https://github.com/apache/shardingsphere/issues/13228#issuecomment-950075577


   Hi @zkxihua Thanks for your feedback, could you try it with the latest version 5.0.0-RC1
   
   


-- 
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