BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext,我出现的这个问题是出在applicationContext.xml配置文件中,具体的出现错误的原因我不知道,不过我下面的这样的做法他就会出错:
<!-- 配置映射文件 -->
<property name="mappingResources">
</property>
上面是在applicationContext.xml中配置Hibernate准备配置映射文件时候留下的,其中什么也没有配置,这样就会报错。我猜想,其他的类似的配置,需要有配置内容才可以,不然应该也会报错,但愿我遇到的问题能够给你一点启发。