java.lang.IllegalStateException

tip

The application is unable to connect to the database.
It could be resolved by configuring access privileges on the database side.


rprp

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • My web.xml has: <context-param> <param-name>parentContextKey</param-name> <param-value>ear.context</param-value> </context-param> java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:397) at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:343) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:653) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:370) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:293) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:673) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:626) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
    via by Grant Gochnauer,
  • My web.xml has: <context-param> <param-name>parentContextKey</param-name> <param-value>ear.context</param-value> </context-param> java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:397) at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:343) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:653) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:370) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:293) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:673) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:626) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
    via by Grant Gochnauer,
    • java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008) at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:397) at org.springframework.web.context.ContextLoader.loadParentContext(ContextLoader.java:343) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:188) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:653) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:370) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:293) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:673) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:626) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)

    Users with the same issue

    ivanszkypeterivanszkypeter
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    ConscriptConscript
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    69 more bugmates