Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data error! Spring transaction,single database ,single table,3.0.0 M2 #1261

Closed
chrisHao opened this issue Sep 14, 2018 · 2 comments
Closed

Comments

@chrisHao
Copy link

chrisHao commented Sep 14, 2018

Enable Spring transaction with @transactional (no arguments)。
Error stack:
com.google.common.eventbus.EventBus$LoggingHandler.handleException Exception thrown by subscriber method listen(io.shardingsphere.core.transaction.event.TransactionEvent) on subscriber io.shardingsphere.core.transaction.listener.TransactionListener@109ea647 when dispatching event: io.shardingsphere.core.transaction.event.WeakXaTransactionEvent@42ca1a2b
java.lang.NullPointerException
at io.shardingsphere.core.transaction.listener.TransactionListener.listen(TransactionListener.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at io.shardingsphere.core.jdbc.adapter.AbstractConnectionAdapter.setAutoCommit(AbstractConnectionAdapter.java:91)
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:283)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:378)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:474)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:289)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.uplus.cncb.fans.service.wrapper.ManagerServiceWrapper$$EnhancerBySpringCGLIB$$3d794b78.bind()
at com.uplus.cncb.fans.controller.MngIndexController.bind(MngIndexController.java:90)

@terrymanu
Copy link
Member

Hello, only english for discuss issue.

@chrisHao chrisHao changed the title spring事务,单库单表更新数据异常 Update data error! Spring transaction,single database ,single table,3.0.0 M2 Sep 14, 2018
@terrymanu
Copy link
Member

Duplicated with #1116. Before submit a issue, we suggest you may search existing issues firstly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants