Error when adding ContextListner
Noriyuki TAKEI
ntakei at sios.com
Fri Oct 20 16:13:44 UTC 2023
Hi, all.
I edited the web.xml for launching the Listener class in Shibboleth IdP
v5.0.0 as follows:
<listener>
<display-name>ContosoAuthnContextListener</display-name>
<listener-class>com.example.idp.shibboleth.contoso.servlet.ContosoAuthnContextListener</listener-class>
</listener>
Then, I received the following error:
2023-10-20 15:47:11.101:WARN :oejw.WebAppContext:main: Failed startup of
context o.e.j.w.WebAppContext at b2c9a9c{Shibboleth Identity
Provider,/idp,[file:///opt/jetty-base/tmp/jetty-127_0_0_1-80-idp_war-_idp-any-164522878908199773/webinf/,
jar:file:///opt/shibboleth-idp/war/idp.war!/],UNAVAILABLE}{/opt/shibboleth-idp/war/idp.war}
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
at
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:85)
...omit...
Subsequently, I added the following content to the web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
After that, I encountered another error:
2023-10-20 16:04:26.149:WARN :oejw.WebAppContext:main: Failed startup of
context o.e.j.w.WebAppContext at b2c9a9c{Shibboleth Identity
Provider,/idp,[file:///opt/jetty-base/tmp/jetty-127_0_0_1-80-idp_war-_idp-any-18363158295659732048/webinf/,
jar:file:///opt/shibboleth-idp/war/idp.war!/],UNAVAILABLE}{/opt/shibboleth-idp/war/idp.war}
java.lang.IllegalStateException: Cannot initialize context because there is
already a root application context present - check whether you have
multiple ContextLoader* definitions in your web.xml!
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:247)
Do you have any solutions to this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20231021/158639e9/attachment.htm>
More information about the users
mailing list