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

3.0.0.M2 TransactionListener throw NullPointerException #1116

Closed
Pramy opened this issue Aug 8, 2018 · 8 comments
Closed

3.0.0.M2 TransactionListener throw NullPointerException #1116

Pramy opened this issue Aug 8, 2018 · 8 comments

Comments

@Pramy
Copy link
Contributor

Pramy commented Aug 8, 2018

  • environment
    java 1.8.144
    3.0.0.M2
  • question
    An exception occurs when inserting data in batches
Exception thrown by subscriber method listen(io.shardingsphere.core.transaction.event.TransactionEvent) on subscriber io.shardingsphere.core.transaction.listener.TransactionListener@50265207 when dispatching event: io.shardingsphere.core.transaction.event.WeakXaTransactionEvent@54be0a09
java.lang.NullPointerException: null
	at io.shardingsphere.core.transaction.listener.TransactionListener.listen(TransactionListener.java:61) ~[sharding-core-3.0.0.M2.jar:?]
	at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87) ~[guava-24.0-jre.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72) ~[guava-24.0-jre.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398) ~[guava-24.0-jre.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67) ~[guava-24.0-jre.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:108) ~[guava-24.0-jre.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:212) ~[guava-24.0-jre.jar:?]
	at io.shardingsphere.core.jdbc.adapter.AbstractConnectionAdapter.setAutoCommit(AbstractConnectionAdapter.java:91) ~[sharding-jdbc-3.0.0.M2.jar:?]
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doCleanupAfterCompletion(DataSourceTransactionManager.java:374) ~[spring-jdbc-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1007) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:793) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:532) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:304) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.0.7.RELEASE.jar:5.0.7.RELEASE]
	at 

But there is no problem with using 3.0.0.M2-SNAPSHOT

@terrymanu
Copy link
Member

could you fill necessary information follow in issue template?

For English only, other languages we will close it directly.

Please answer these questions before submitting your issue. Thanks!

Which version of Sharding-Sphere do you using?

Which project do you using? Sharding-JDBC or Sharding-Proxy?

Expected behavior

Actual behavior

Reason analyze

Steps to reproduce the behavior

For bug report, please MUST provide the reproduce example codes (such as a github link).

@wangjinyu1994
Copy link

Have you solved this problem?I also encountered this problem after upgrading to the latest version

@wslongchen
Copy link

I ncountered this problem after upgrading to the latest version ,too

terrymanu added a commit that referenced this issue Aug 10, 2018
for #1116, resolve transactionManager is null when receiving new request from client application.
@terrymanu
Copy link
Member

fixed at 3.0.0.M3

@niuniu9631
Copy link

hello,when will the next release plan be released? @terrymanu
there is a repair plan for the current version(3.0.0.M2).

@joey168
Copy link

joey168 commented Sep 6, 2018

@terrymanu When is 3.0.0M3 pushed to Maven warehouse? thanks

@terrymanu
Copy link
Member

It is already on the way. Sync to maven centre repo need 1-2 days generally.

@joey168
Copy link

joey168 commented Sep 6, 2018

ok,thank you for the answer!

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

6 participants