Hello again,
I'm trying to get my AuthenticationManager being session scoped. I try to confiugre it as follows:
and getCode:<bean id="AuthenticationManager" class="....AuthenticationManagerImpl" scope="session"> <constructor-arg ref="UserDAO" /> <aop:scoped-proxy /> </bean>
Seems like the Proxy doesn't forward the constructor argument.Code:11:13:57,352 ERROR ContextLoader:205 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AuthenticationManager': Initialization of bean failed; nested exception is null Caused by: java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given at net.sf.cglib.proxy.Enhancer.emitConstructors(Enhancer.java:718) at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:499) at net.sf.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33) at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216) at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377) at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:195) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:150) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:72) at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:87) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:866) ...I rarely would like to switch to SetterInjection.
Any Ideas?
Regards
Ollie


I rarely would like to switch to SetterInjection.
Reply With Quote