java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' befo

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext
翻译
org.springframework.beans.factory.BeanDefinitionStoreException:IOException从类路径资源[applicationContext.xml]解析XML文档; 嵌套异常是java.io.FileNotFoundException:无法打开类路径资源[applicationContext.xml],因为它不存在

java.lang.IllegalStateException:BeanFactory未初始化或已经关闭 - 在通过ApplicationContext访问bean之前调用’refresh’

网上查了是这个配置问题
classpath:applicationContext.xml

只需要在web.xml中修改如下图所示配置就可以正常启动了

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' befo_第1张图片Unable to instantiate Action, userAction, defined for ‘user_regist’ in namespace '/‘Error creating bean with name ‘userAction’ defined in URL [file:/D:/apache-tomcat-7.0.52/webapps/sshday/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.ids.web.action.UserAction]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problem:
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
翻译
无法实例化在命名空间’/'中为’user_regist’定义的Action,userAction错误创建在URL中定义名为’userAction’的bean [file:/ D:/apache-tomcat-7.0.52/webapps/sshday/WEB-INF /classes/applicationContext.xml]:bean的实例化失败; 嵌套异常是org.springframework.beans.BeanInstantiationException:无法实例化[com.ids.web.action.UserAction]:构造函数抛出异常; 嵌套异常是java.lang.Error:未解决的编译问题:
java.util.Map $ Entry类型无法解析。 它是从所需的.class文件间接引用的

是因为serviceimpl业务层,没有添加注解 @Transactional 添加后就可以正常访问了

你可能感兴趣的:(Be)