I can't figure out how to set a system property from /WEB-INF/applicationContext.xml. I tried the following (taken from the example at http://www.springframework.org/docs/...ctoryBean.html), but I get a java.lang.NullPointerException:
The interesting thing is that the java.lang.NullPointerException doesn't come from a Spring stack trace, it is comming from Tomcat:Code:<bean id="setKerberosProperties" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass"><value>java.lang.System</value></property> <property name="targetMethod"><value>setProperties</value></property> <property name="arguments"> <list> <props> <prop key="java.security.krb5.realm">xx.xx.com</prop> <prop key="java.security.krb5.kdc">yy.yy.com</prop> </props> </list> </property> </bean>
If I remove the "setKerberosProperties" bean stanza from /WEB-INF/applicationContext.xml, the web application deploys fine (but doesn't work since I need to define those two system properties).Code:java.io.IOException: java.lang.NullPointerException at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:283)null ...
What is the "Spring Way" to set system properties from one's /WEB-INF/applicationContext.xml?
I need to set these system properties in oreder to get Acegi (and CAS) to use our Kerberos servers for authentication.
Warmest regards, Matt


Reply With Quote