当前位置:网站首页>BeanFactory not initialized or already closed - call ‘refresh‘ before accessing beans via the Applic
BeanFactory not initialized or already closed - call ‘refresh‘ before accessing beans via the Applic
2022-07-28 19:52:00 【Alex_ designer】
background :
Initiate error reporting :
serious : Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1006)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:982)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:934)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:583)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5428)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1439)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1439)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.I
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
reason
I used to use jetty Service is always normal , Use today tomcat Failed to initialize the startup service
as a result of spring Will not be found under the default address applicationContext.xml file , Because I rename , The address has also changed , So you need to be in web.xml Configuration path
programme
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:config/applicationContext-api.xml</param-value>
</context-param>After adding, it starts successfully !
边栏推荐
- Leetcode day3 find duplicate email addresses
- npm安装和卸载全局包
- 冲刺金九银十丨熬夜半个月汇集大厂Android岗1600道面试真题
- Germany and Portugal have announced that they will not disable Huawei 5g equipment, but Germany will set strict restrictions!
- 数字滤波器设计——Matlab
- WPF implements MessageBox message prompt box with mask
- redis 主从架构(sizeof函数怎么计算)
- How many types of rain do you know?
- Saltstack configuration management
- Redis笔记
猜你喜欢

KPMG China: insights into information technology audit projects of securities fund management institutions

Servlet learning notes

App自动化测试是怎么实现H5测试的

shared_ PTR and make_ Use of shared

Common APIs in string

Sprint for golden nine and silver ten, stay up at night for half a month, collect 1600 real interview questions from Android post of major manufacturers

Quickly install torch spark, torch geometric and other packages in moment pool cloud

并发程序设计,你真的懂吗?

11. Learn MySQL union operator

英文翻译葡萄牙语-批量英文转换葡萄牙语-各种语言免费互译转换
随机推荐
Pagoda panel construction novel CMS management system source code measurement - thinkphp6.0
Cell综述:人类微生物组研究中的单细胞方法
Common APIs in string
redis 主从架构(sizeof函数怎么计算)
这个客制化键盘,秀翻我了~
Salt SSH of saltstack
NDK series (5): from introduction to practice, JNI explodes the liver and explains everything in detail!
Saltstack configuration management
毕马威中国:证券基金经营机构信息技术审计项目发现洞察
What parameters should be passed in calling integer or character array functions
[notes] Networking: Internet product managers change the world
Use Hal Library of STM32 to drive 1.54 inch TFT screen (240*240 st7789v)
Search problems and technologies
英文翻译葡萄牙语-批量英文转换葡萄牙语-各种语言免费互译转换
The United States will provide $25billion in subsidies to encourage chip manufacturers such as Intel to move back to production lines
Integration and implementation of login click graphic verification code in personal blog system
[网络]跨区域网络的通信学习IPv4地址的分类和计算
MySQL8 Encrypting InnoDB Tablespaces
Leetcode Day1 score ranking
STC12C5A60S2 function description (STC12C5A60S2 is triggered by default)