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

spring boot 3.2.4 + spring-boot-starter-log4j2 + spring-boot-starter-undertow #2453

Closed
mpv945 opened this issue Apr 9, 2024 · 3 comments · May be fixed by #2454
Closed

spring boot 3.2.4 + spring-boot-starter-log4j2 + spring-boot-starter-undertow #2453

mpv945 opened this issue Apr 9, 2024 · 3 comments · May be fixed by #2454

Comments

@mpv945
Copy link

mpv945 commented Apr 9, 2024

Stop service error

2024-04-09 11:36:26.124 traceId: INFO  c.z.h.HikariDataSource                   HikariPool-1 - Shutdown completed.
ERROR StatusConsoleListener Unable to unregister MBeans
 java.lang.IllegalStateException: UT015023: This Context has been already destroyed
	at io.undertow.servlet.spec.ServletContextImpl.getDeploymentInfo(ServletContextImpl.java:210)
	at io.undertow.servlet.spec.ServletContextImpl.getInitParameterNames(ServletContextImpl.java:434)
	at org.springframework.web.context.support.ServletContextPropertySource.getPropertyNames(ServletContextPropertySource.java:41)
	at org.springframework.core.env.EnumerablePropertySource.containsProperty(EnumerablePropertySource.java:74)
	at org.springframework.core.env.PropertySourcesPropertyResolver.containsProperty(PropertySourcesPropertyResolver.java:51)
	at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.containsProperty(ConfigurationPropertySourcesPropertyResolver.java:56)
	at org.springframework.core.env.AbstractEnvironment.containsProperty(AbstractEnvironment.java:546)
	at org.springframework.boot.logging.log4j2.SpringEnvironmentPropertySource.containsProperty(SpringEnvironmentPropertySource.java:55)
	at org.apache.logging.log4j.util.PropertiesUtil$Environment.get(PropertiesUtil.java:531)
	at org.apache.logging.log4j.util.PropertiesUtil$Environment.access$200(PropertiesUtil.java:448)
	at org.apache.logging.log4j.util.PropertiesUtil.getStringProperty(PropertiesUtil.java:396)
	at org.apache.logging.log4j.util.PropertiesUtil.getBooleanProperty(PropertiesUtil.java:169)
	at org.apache.logging.log4j.util.PropertiesUtil.getBooleanProperty(PropertiesUtil.java:158)
	at org.apache.logging.log4j.core.jmx.Server.isJmxDisabled(Server.java:131)
	at org.apache.logging.log4j.core.jmx.Server.unregisterLoggerContext(Server.java:244)
	at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:364)
	at org.apache.logging.log4j.core.AbstractLifeCycle.stop(AbstractLifeCycle.java:136)
	at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.lambda$getShutdownHandler$2(Log4J2LoggingSystem.java:453)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.springframework.boot.SpringApplicationShutdownHook.run(SpringApplicationShutdownHook.java:116)
	at java.base/java.lang.Thread.run(Thread.java:1583)
@ppkarwasz
Copy link
Contributor

This is due to spring-projects/spring-boot#33450.

A partial fix was already applied to the 3.x branch in #1799 and is available in version 3.0.0-beta1. I backported the changes to the 2.x branch in #2454 and they will be available in our next 2.24.0 release.

@ppkarwasz
Copy link
Contributor

@mpv945,

This should be fixed by spring-projects/spring-boot#40178 in version 3.1.11 and 3.2.5. Can you check it?

@mpv945
Copy link
Author

mpv945 commented May 6, 2024

@mpv945,

这应该由版本 3.1.11 和 3.2.5 中的spring-projects/spring-boot#40178修复。你能检查一下吗?

@mpv945,

This should be fixed by spring-projects/spring-boot#40178 in version 3.1.11 and 3.2.5. Can you check it?

It does work, thank you!

@mpv945 mpv945 closed this as completed May 6, 2024
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

Successfully merging a pull request may close this issue.

2 participants