Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41145

SakaiContextLoader trouble loading xlogin-context.xml

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.0, 20.0 [Tentative]
    • Fix Version/s: 19.0, 20.0 [Tentative]
    • Component/s: Kernel
    • Labels:
      None
    • 19 status:
      Resolved
    • Test Plan:
      Hide

      Add a bean configuration file to sakai.home like "xlogin-context.xml" and verify the beans are loaded during startup.

      Show
      Add a bean configuration file to sakai.home like "xlogin-context.xml" and verify the beans are loaded during startup.

      Description

      I am having an issue with the SakaiContextLoader when attempting to use an xlogin-context.xml configured for CAS in 19.x. With logging turned up, here's the stack trace when attempting to use xlogin-context.xml in sakai.home:

      18-Dec-2018 08:13:24.343 DEBUG [localhost-startStop-1] org.sakaiproject.component.impl.SakaiContextLoader.getHomeBeanDefinitionIfExists Servlet xlogin is checking for a bean definition at sakai.home/xlogin-context.xml
      18-Dec-2018 08:13:24.343 INFO [localhost-startStop-1] org.sakaiproject.component.impl.SakaiContextLoader.getHomeBeanDefinitionIfExists Servlet xlogin located an additional bean definition at sakai.home/xlogin-context.xml
      18-Dec-2018 08:13:24.343 DEBUG [localhost-startStop-1] org.sakaiproject.component.impl.SakaiContextLoader.customizeContext Servlet xlogin is attempting to load bean definition [/usr/local/sakai-home/xlogin-context.xml]
      18-Dec-2018 08:13:24.344 ERROR [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
      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:170)
      at org.sakaiproject.component.impl.SakaiContextLoader.customizeContext(SakaiContextLoader.java:74)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:442)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
      at org.sakaiproject.util.SakaiContextLoaderListener.contextInitialized(SakaiContextLoaderListener.java:49)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
      at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      18-Dec-2018 08:13:24.347 INFO [localhost-startStop-1] org.sakaiproject.util.ToolListener.contextInitialized registering tools from resource: /WEB-INF/tools/sakai.login.xml
      18-Dec-2018 08:13:24.348 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
      18-Dec-2018 08:13:24.349 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/sakai-login-tool] startup failed due to previous errors

      From Sam and Earle, the current workaround is to do what Sam suggested; see this file for info https://github.com/sakaiproject/sakai/blob/master/login/login-tool/tool/src/webapp/WEB-INF/applicationContext.xml

       

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ern Earle R Nietzel
                Reporter:
                jmiller171 Jeb Miller
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code