[cas-user] TGT expiration policy override not working

166 views
Skip to first unread message

Zac Harvey

unread,
Feb 2, 2015, 3:27:28 PM2/2/15
to cas-...@lists.jasig.org

On CAS 4 here; I am trying to extend the TGT expiration policy from 2 hours (default) to 9 hours, and so I started with the file located at https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/ticketExpirationPolicies.xml and then just changed:


    <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"
          c:maxTimeToLive="${tgt.maxTimeToLiveInSeconds:28800}" c:timeToKill="${tgt.timeToKillInSeconds:7200}" c:timeUnit-ref="SECONDS" />

To:


    <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"
          c:maxTimeToLive="${tgt.maxTimeToLiveInSeconds:32400}" c:timeToKill="${tgt.timeToKillInSeconds:32400}" c:timeUnit-ref="SECONDS" />


When I go to restart the server I get a Spring/Beans exception:


SEVERE: Exception starting filter springSecurityFilterChain
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grantingTicketExpirationPolicy' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketExpirationPolicies.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:250)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1075)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:979)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:75)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)



What is going on here?


-- 
You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

Misagh Moayyed

unread,
Feb 2, 2015, 3:41:57 PM2/2/15
to cas-...@lists.jasig.org

Well, if you started from that file you have referenced change/config that does not exist in 4. You have used “master” instead.

 

Try using this file instead:

https://github.com/Jasig/cas/blob/4.0.x/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/ticketExpirationPolicies.xml

 

Note the branch name: 4.0.x.

You are currently subscribed to cas-...@lists.jasig.org as: mmoa...@unicon.net
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

Zac Harvey

unread,
Feb 3, 2015, 6:03:53 AM2/3/15
to cas-...@lists.jasig.org

​Thanks Misagh - so what version does "master" correspond to (just for my future reference)?


From: Misagh Moayyed <mmoa...@unicon.net>
Sent: Monday, February 2, 2015 3:36 PM
To: cas-...@lists.jasig.org
Subject: RE: [cas-user] TGT expiration policy override not working
 
-- 
You are currently subscribed to cas-...@lists.jasig.org as: zha...@commercehub.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

Misagh Moayyed

unread,
Feb 3, 2015, 1:03:58 PM2/3/15
to cas-...@lists.jasig.org

The next version of CAS J which at this point is 4.1 it seems.  

Reply all
Reply to author
Forward
0 new messages