Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Lifecycle methods hints are not defined properly if the method is defined in a parent #1108

Closed

Description

@sdeleuze

While performing a build of configserver sample (not reproducible consistently), I had this stacktrace which could mean we should refine the exception handling in InitDestroyBeanPostProcessor.

2021-09-30 10:39:56.270  WARN 15751 --- [           main] o.s.a.c.a.InitDestroyBeanPostProcessor   : Failed to invoke destroy method on bean with name 'simpleMeterRegistry'

java.lang.NullPointerException: null
	at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:571) ~[na:na]
	at org.springframework.aot.context.annotation.InitDestroyBeanPostProcessor.invokeMethod(InitDestroyBeanPostProcessor.java:121) ~[na:na]
	at org.springframework.aot.context.annotation.InitDestroyBeanPostProcessor.invokeDestroyMethod(InitDestroyBeanPostProcessor.java:95) ~[na:na]
	at org.springframework.aot.context.annotation.InitDestroyBeanPostProcessor.postProcessBeforeDestruction(InitDestroyBeanPostProcessor.java:85) ~[na:na]
	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:184) ~[na:na]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:587) ~[na:na]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:559) ~[na:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1152) ~[na:na]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:520) ~[na:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1145) ~[na:na]
	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1106) ~[na:na]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:596) ~[na:na]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[na:na]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:719) ~[configserver:2.6.0-M3]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:401) ~[configserver:2.6.0-M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[configserver:2.6.0-M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[configserver:2.6.0-M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1279) ~[configserver:2.6.0-M3]
	at org.demo.configserver.ConfigServerApplication.main(ConfigServerApplication.java:19) ~[configserver:0.0.1-SNAPSHOT]

Activity

  1. added this to the 0.11.0-M1 milestone on Sep 30, 2021
  2. changed the title [-]Refine exception handling in InitDestroyBeanPostProcessor[/-] [+]Lifecycle methods hints are not defined properly if the method is defined in a parent[/+] on Sep 30, 2021
  3. added
    type: bug
    and removed
    type: task
    on Sep 30, 2021
  4. added a commit that references this issue on Feb 17, 2024
    507112e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions