BeanFactory not initialized or already closed - call 'refresh' before accessing beans

前端 未结 7 1298
太阳男子
太阳男子 2021-01-03 23:09

I\'m trying to add spring security to a regular JSF application. After repeated tries and I\'m failing with the following error on tomcat bring-up.

Here is the entir

相关标签:
7条回答
  • 2021-01-04 00:09

    I had this error as well, and the problem turned out that, with cut and paste, I had inadvertently listed the same bean twice in my spring-servlet.xml:

    <bean id="pathInfoHelper" class="org.nationalhistory.util.PathInfoHelper">
    </bean>
    
    <bean id="imageIndexer" class="org.nationalhistory.util.ImageIndexer"/>
    
    <bean id="pathInfoHelper" class="org.nationalhistory.util.PathInfoHelper">
    </bean>
    

    I looked here and found this with the help of om39a's answer above (thanks!). I had just edited the file, and knew there was a chance I had pasted something extra (or something less) inadvertently. This double-entry, however, was NOT the bean that the error referred to!

    0 讨论(0)
提交回复
热议问题