Marvin, Thank you for the response. I changed the p:location to be classpath:/private.p8. I don't see it mentioned in the stack trace either. Odd thing is, publicKeyFactoryBean does not seem to have this issue. Here is the full log result from trying to deploy CAS:
INFO: Deploying web application archive cas.war
2012-02-27 11:56:26,550 INFO
[org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 4 services.>
2012-02-27 11:56:28,008 INFO
[org.jasig.cas.util.AutowiringSchedulerFactoryBean] - <Shutting down Quartz
Scheduler>
2012-02-27 11:56:28,018 ERROR
[org.springframework.web.context.ContextLoader] - <Context initialization
failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'googleAccountsArgumentExtractor' defined in ServletContext
resource
[/WEB-INF/spring-configuration/argumentExtractorsConfiguration.xml]: Cannot
resolve reference to bean 'privateKeyFactoryBean' while setting bean
property 'privateKey'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:328)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:106)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:47)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy0(SafeContextLoaderListener.java:62)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy1$advice(SafeContextLoaderListener.java:44)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeCont
extLoaderListener.java:1)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4206)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
99)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:142)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at
org.apache.catalina.core.StandardService.start(StandardService.java:525)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean
Definition(DefaultListableBeanFactory.java:527)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocal
BeanDefinition(AbstractBeanFactory.java:1083)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:274)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:322)
... 42 more
2012-02-27 11:56:28,022 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.BeanCreationException: Error creating bean
with name 'googleAccountsArgumentExtractor' defined in ServletContext
resource
[/WEB-INF/spring-configuration/argumentExtractorsConfiguration.xml]: Cannot
resolve reference to bean 'privateKeyFactoryBean' while setting bean
property 'privateKey'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:328)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:106)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:47)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy0(SafeContextLoaderListener.java:62)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy1$advice(SafeContextLoaderListener.java:44)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeCont
extLoaderListener.java:1)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4206)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
99)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:142)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at
org.apache.catalina.core.StandardService.start(StandardService.java:525)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean
Definition(DefaultListableBeanFactory.java:527)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocal
BeanDefinition(AbstractBeanFactory.java:1083)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:274)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:322)
... 42 more
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.BeanCreationException: Error creating bean
with name 'googleAccountsArgumentExtractor' defined in ServletContext
resource
[/WEB-INF/spring-configuration/argumentExtractorsConfiguration.xml]: Cannot
resolve reference to bean 'privateKeyFactoryBean' while setting bean
property 'privateKey'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:328)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eValueIfNecessary(BeanDefinitionValueResolver.java:106)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Ab
stractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSi
ngleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFac
toryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:425)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:276)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:197)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:47)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy0(SafeContextLoaderListener.java:62)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized_aroundBo
dy1$advice(SafeContextLoaderListener.java:44)
at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeCont
extLoaderListener.java:1)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4206)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
99)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:142)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at
org.apache.catalina.core.StandardService.start(StandardService.java:525)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'privateKeyFactoryBean' is defined
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean
Definition(DefaultListableBeanFactory.java:527)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocal
BeanDefinition(AbstractBeanFactory.java:1083)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abst
ractBeanFactory.java:274)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:190)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolv
eReference(BeanDefinitionValueResolver.java:322)
... 42 more
Feb 27, 2012 11:56:28 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Feb 27, 2012 11:56:28 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/cas] startup failed due to previous errors
-----Original Message-----
From: Marvin S. Addison [mailto:[email protected]]
Sent: Monday, February 27, 2012 10:42 AM
To: [email protected]
Subject: Re: [cas-user] No bean named 'privateKeyFactoryBean' is defined
> [/WEB-INF/spring-configuration/argumentExtractorsConfiguration.xml]:
> Cannot resolve reference to bean 'privateKeyFactoryBean' while
> setting bean property 'privateKey'; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> bean named 'privateKeyFactoryBean' is defined
At face value, the error looks like a red herring since you have such a
bean defined and it's wired correctly. I'm thinking the real problem is
loading the resource from the classpath such that the factory bean fails
to be created, and therefore can't satisfy the Spring dependency. I'd
expect an error to that effect at some point in the stack trace, but
I've been surprised before.
> <bean id="privateKeyFactoryBean"
> class="org.jasig.cas.util.PrivateKeyFactoryBean"
> p:location="classpath:private.p8"
> p:algorithm="RSA" />
Where exactly is private.p8 in the exploded WAR file? I'd use
classpath:/private.p8 and put it in /WEB-INF/classes/private.p8 to be
clear that you mean it's on the root of the classpath. See if that helps.
M
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
smime.p7s
Description: S/MIME cryptographic signature
