Hello,
I seem to be having some trouble with changes I make in cas.properties taking effect when I build the overlay. I’m trying to setup an ehcache and when I specify:
cas.ticket.registry.ehcache.configLocation: file:/etc/cas/config/ehcache-replicated.xml
I see this in the catalina.out of tomcat:
2018-02-16 14:42:40,922 WARN [net.sf.ehcache.config.ConfigurationFactory] - <No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:…./webapps/cas/WEB-INF/lib/ehcache-2.10.4.jar!/ehcache-failsafe.xml>
I can confirm that /etc/cas/config/ehcache-replicated.xml exists, has the content I want, and is owned and readable by the user running tomcat.
I had a similar problem with the log4j2.xml in the cas-management app and worked around it by putting the log4j2.xml file in src/main/webapp/WEB-INF/classes. I’ve tried the same here but it doesn’t work. What am I not doing correctly with the overlay?
Thank you,
Jeremiah
-- Ray Bon Programmer analyst Development Services, University Systems 2507218831 | CLE 019 | rb...@uvic.ca
Ray,
This is what I have in my cas.properties now for ehcache. I couldn’t figure out where classpath actually referenced so I tried the absolute file path.
cas.ticket.registry.ehcache.replicateUpdatesViaCopy=true
cas.ticket.registry.ehcache.cacheManagerName=ticketRegistryCacheManager
cas.ticket.registry.ehcache.replicatePuts=true
cas.ticket.registry.ehcache.replicateUpdates=true
cas.ticket.registry.ehcache.memoryStoreEvictionPolicy=LRU
cas.ticket.registry.ehcache.configLocation=file:/etc/cas/config/ehcache-replicated.xml
cas.ticket.registry.ehcache.maximumBatchSize=100
cas.ticket.registry.ehcache.shared=false
and in /etc/cas/config/ehcache-replicated.xml
<ehcache name="ehCacheTicketRegistryCache"
updateCheck="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
<diskStore path="java.io.tmpdir/cas"/>
<!-- Automatic Peer Discovery -->
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=32"
propertySeparator="," />
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=32"
propertySeparator="," />
</ehcache>
Thanks,
Jeremiah
--
- Website:
https://apereo.github.io/cas
- Gitter Chatroom:
https://gitter.im/apereo/cas
- List Guidelines:
https://goo.gl/1VRrw7
- Contributions:
https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
cas-user+u...@apereo.org.
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1518815719.1763.37.camel%40uvic.ca.
Ray,
Thanks for that suggestion. I tried
cas.ticket.registry.ehcache.configLocation=classpath:/ehcache-replicated.xml
With the file at
src/main/resources/ehcache-replicated.xml
I can see it ends up in the deployed war
cas/WEB-INF/classes/ehcache-replicated.xml
But it wasn’t being processed by tomcat
2018-02-20 14:10:24,589 WARN [net.sf.ehcache.config.ConfigurationFactory] - <No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: file:yyyyy/webapps/cas/WEB-INF/classes/ehcache-failsafe.xml>
I was following a generic ehcache guide and ended up naming the file ehcache.xml and without changing the configLocation varible to match, the file was loaded.
It feels like changing cas.properties has zero effect on some things. Bottom line though, it works now.
.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1519149462.1765.52.camel%40uvic.ca.