当前位置:网站首页>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 !
边栏推荐
- How to write the SQL statement of time to date?
- MIR专题征稿 | 常识知识与推理:表示、获取与应用 (10月31日截稿)
- Leetcode Day5 delete duplicate email
- Android section 13 03xutils detailed explanation of database framework (addition, deletion and modification)
- With the help of panel industry innovation, will FPGA become the best choice for TCON?
- Codeignier framework implements restful API interface programming
- 这个客制化键盘,秀翻我了~
- 毕马威中国:证券基金经营机构信息技术审计项目发现洞察
- Cell review: single cell methods in human microbiome research
- 软考高级考试中有五大证书,哪个更值得考?
猜你喜欢

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

Android section 13 03xutils detailed explanation of database framework (addition, deletion and modification)

Android-第十三节03xUtils-数据库框架(增删改查)详解

English article translation - English article translation software - free batch translation

Basic concept and essence of Architecture

How navicate modifies the database name

How does app automated testing achieve H5 testing

String中常用的API

数字滤波器设计——Matlab

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
随机推荐
Scrapy Spider源码分析
China's first chip stamp released: built-in 120um ultra-thin NFC chip
redis 主从架构(sizeof函数怎么计算)
利用STM32的HAL库驱动1.54寸 TFT屏(240*240 ST7789V)
[network] communication across regional networks learn how routing tables work
Netcoreapi operation excel table
First blog
Edge detection and connection of image segmentation realized by MATLAB
Amazon launched Amazon one palm payment system, and the contactless palm vein recognition market is expected to explode
Basic concept and essence of Architecture
English article translation - English article translation software - free batch translation
Design of air combat game based on qtgui image interface
This customized keyboard turns me on~
stc12c5a60s2功能说明(STC12C5A60S2默认触发)
并发程序设计,你真的懂吗?
String中常用的API
[wechat applet development] page navigation and parameter transmission
WPF implements MessageBox message prompt box with mask
峰值速率超2Gbps!高通在中国首发通过5G毫米波MIMO OTA测试
Cloud computing notes part.2 - Application Management