Update:

In propertyFileConfigurer.xml I removed this property:

                                <property name="ignoreResourceNotFound" 
value="true"/>

Then I built and re-deployed cas.war to Tomcat. Now the exception I see is:

Caused by: java.io.FileNotFoundException: class path resource 
[WEB-INF/cas.properties] cannot be opened because it does not exist
        at 
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
        at 
org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:143)
        at 
org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98)
        at 
org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175)
        at 
org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156)
        at 
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:78)
        ... 21 more

So it's almost like cas.properties can't be "seen" by CAS (although it 
certainly exists under WEB-INF), and it's almost like CAS's default 
cas.properties isn't defining a cas.securityContext.status.allowedSubnet 
property.  Very bizarre...

From: Zac Harvey
Sent: Thursday, June 12, 2014 3:37 PM
To: 'cas-user@lists.jasig.org'
Subject: CAS securityContext exception

My WEB-INF/spring-configuration/propertyFileConfigurer.xml defines a location 
for cas.properties as:

                <bean id="propertyPlaceholderConfigurer" 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
                                <property name="ignoreResourceNotFound" 
value="true"/>
                                <property name="locations">
                                                <list>
                                                                
<value>classpath:/WEB-INF/cas.properties</value>
                                                </list>
                                </property>
                </bean>

My WEB-INF/cas.properties file (the entire file):

                ## Log4j
                log4j.config.location=classpath:log4j.xml

                ## CAS core
                cas.securityContext.status.allowedSubnet=127.0.0.1

My src/main/log4j.xml file has CAS logging to a /var/log/mycas.log file.

When I deploy cas.war (using 4.0.0) to my Tomcat7 server, I see the following 
exception in mycas.log:

2014-06-12 15:00:37,200 ERROR 
[org.jasig.cas.web.init.SafeContextLoaderListener] - SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not 
have initialized.
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
definition with name 
'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0' 
defined in null: Could not resolve placeholder 
'cas.securityContext.status.allowedSubnet' in string value 
"hasIpAddress('${cas.securityContext.status.allowedSubnet}')"
        at 
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
        at 
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:220)
        at 
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:84)
        at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
        at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:669)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
        at 
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
                                ... rest of stack trace omitted for brevity

I get this exception regardless of whether my cas.properties file has a 
"cas.securityContext.status.allowedSubnet" property or not. Ideas?

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

Reply via email to