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

java.lang.NullPointerException: null 空指针异常 #1025

Open
xinzhuxiansheng opened this issue Aug 30, 2023 · 0 comments
Open

java.lang.NullPointerException: null 空指针异常 #1025

xinzhuxiansheng opened this issue Aug 30, 2023 · 0 comments

Comments

@xinzhuxiansheng
Copy link

Describe the bug

master分支,执行 "jraft-example"模块下的 election示例,
com.alipay.sofa.jraft.example.election.ElectionBootstrap 的执行参数为

/Users/a/Code/Java/sofa-jraft/tmp/datapath/server01
yzhougid01
127.0.0.1:2881
127.0.0.1:2881

Expected behavior

Actual behavior

发生异常,异常信息为:

2023-08-30 15:16:25 [JRaft-FSMCaller-Disruptor-0] ERROR LogExceptionHandler:64 - Handle FSMCallerImpl disruptor event error, event is com.alipay.sofa.jraft.core.FSMCallerImpl$ApplyTask@49d27be0
java.lang.NullPointerException: null
	at com.alipay.sofa.jraft.example.election.ElectionBootstrap$1.onLeaderStart(ElectionBootstrap.java:53) ~[classes/:?]
	at com.alipay.sofa.jraft.example.election.ElectionOnlyStateMachine.onLeaderStart(ElectionOnlyStateMachine.java:58) ~[classes/:?]
	at com.alipay.sofa.jraft.core.NodeImpl$ConfigurationChangeDone.run(NodeImpl.java:2341) ~[classes/:?]
	at com.alipay.sofa.jraft.core.FSMCallerImpl.doCommitted(FSMCallerImpl.java:554) ~[classes/:?]
	at com.alipay.sofa.jraft.core.FSMCallerImpl.runApplyTask(FSMCallerImpl.java:467) ~[classes/:?]
	at com.alipay.sofa.jraft.core.FSMCallerImpl.access$100(FSMCallerImpl.java:73) ~[classes/:?]
	at com.alipay.sofa.jraft.core.FSMCallerImpl$ApplyTaskHandler.onEvent(FSMCallerImpl.java:150) ~[classes/:?]
	at com.alipay.sofa.jraft.core.FSMCallerImpl$ApplyTaskHandler.onEvent(FSMCallerImpl.java:142) ~[classes/:?]
	at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:137) [disruptor-3.3.7.jar:?]
	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_371]

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • SOFAJRaft version:
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant