NullPointerException happened when using SpringContainer.getContext() #3476
Closed
Description
- Dubbo version: 2.5.9
- Operating System version: Suse Linux 11
- Java version: 1.8
Steps to reproduce this issue
- write a project that is a provider side exposed serviceA and in the service implimentation invokes another remote service serviceB. The invoke code is like this SpringContainer.getContext().getBean("ref");
- continious request from outside for the serviceA (many node for serviceA)
- stop one serviceA node
- start the stopped serviceA node
- almost every time first one or two serviceA invoke failed, exception is NullPointerException, occurred for SpringContainer.getContext();
Reason: dubbo service is exposed with spring container ContextRefreshedEvent。 but that moment SpringContainer.getContext() is not started, if it is ContextStartedEvent, this bug will be fixed.
Metadata
Assignees
Labels
No labels