java.lang.IllegalStateException: BeanFactory not initialized or already closed – call ‘refresh’ before accessing beans via the ApplicationContext

robert-reiz.com | 4 months ago
  1. 0

    Could not open ServletContext resource [/WEB-INF/spring3Mvc-servlet.xml] | Robert Reiz

    robert-reiz.com | 8 months ago
    java.lang.IllegalStateException: BeanFactory not initialized or already closed – call ‘refresh’ before accessing beans via the ApplicationContext
  2. 0

    Could not open ServletContext resource [/WEB-INF/spring3Mvc-servlet.xml] | Robert Reiz

    robert-reiz.com | 4 months ago
    java.lang.IllegalStateException: BeanFactory not initialized or already closed – call ‘refresh’ before accessing beans via the ApplicationContext
  3. 0

    Spring IllegalStateExceptions when upgrading to Java 8

    Stack Overflow | 2 years ago | Tracey Farrelly
    java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Wed Jan 07 14:53:45 GMT 2015]; root of context hierarchy
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    BeanFactory not initialized or already closed

    Stack Overflow | 4 years ago | Dedyshka
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
  6. 0

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

    Stack Overflow | 4 years ago | LambeauLeap
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

  1. kjhdofjosvs 2 times, last 3 weeks ago
  2. marcbouvierdav 3 times, last 2 months ago
  3. andyglick 6 times, last 2 months ago
  4. linxiaolong 2 times, last 3 months ago
  5. ruifung 2 times, last 3 months ago
3 more registered users
92 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    BeanFactory not initialized or already closed – call ‘refresh’ before accessing beans via the ApplicationContext

    at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory()
  2. Spring Context
    AbstractApplicationContext.close
    1. org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:172)
    2. org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1066)
    3. org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1040)
    4. org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:988)
    4 frames
  3. Spring
    ContextLoaderListener.contextDestroyed
    1. org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:534)
    2. org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:142)
    2 frames
  4. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4244)
    2. org.apache.catalina.core.StandardContext.stop(StandardContext.java:4879)
    3. org.apache.catalina.core.StandardContext.start(StandardContext.java:4749)
    4. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    5. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    6. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    7. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    8. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    9. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    10. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
    11. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    12. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    13. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
    14. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    15. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    16. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    17. org.apache.catalina.core.StandardService.start(StandardService.java:525)
    18. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    19. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    19 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  6. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames