BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
这几天在接触dubbo,建了一个SpringMvc+maven+dubbo的工程。在测试启动消费端的项目是一直报错!
BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext
三月 14, 2019 11:23:55 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
三月 14, 2019 11:23:55 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/dubbo-et1811-web-mvc] startup failed due to previous errors
三月 14, 2019 11:23:55 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
三月 14, 2019 11:23:55 上午 org.apache.catalina.core.StandardContext listenerStop
严重: 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
web.xml配置
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<filter>
<filter-name>encoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8