Skip to content

NullPointerException happened when using SpringContainer.getContext() #3476

Closed
@stoneapple

Description

  • Dubbo version: 2.5.9
  • Operating System version: Suse Linux 11
  • Java version: 1.8

Steps to reproduce this issue

  1. 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");
  2. continious request from outside for the serviceA (many node for serviceA)
  3. stop one serviceA node
  4. start the stopped serviceA node
  5. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions