Scott,

Take this for instance: We have the class
*CentralAuthenticationServiceImpl*as a
*final* one. I just turned back this class as it was in the released package
of CAS 3.2.1, and the following exception comes up:


[PORTAL][ERROR] StandardContext.filterStart(3639) | Exception starting
filter Acegi Filter Chain Proxy
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'centralAuthenticationService' defined in ServletContext resource
[/WEB-INF/cas-spring-config/applicationContext.xml]: Initialization of bean
failed; nested exception is
org.springframework.aop.framework.AopConfigException: Could not generate
CGLIB subclass of class [class
org.jasig.cas.CentralAuthenticationServiceImpl]: Common causes of this
problem include using a final class or a non-visible class; nested exception
is java.lang.IllegalArgumentException: Cannot subclass final class class
org.jasig.cas.CentralAuthenticationServiceImpl
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
    at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
    at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
    at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
    at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
    at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
    at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at
org.jasig.cas.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:62)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
    at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.springframework.aop.framework.AopConfigException: Could not
generate CGLIB subclass of class [class
org.jasig.cas.CentralAuthenticationServiceImpl]: Common causes of this
problem include using a final class or a non-visible class; nested exception
is java.lang.IllegalArgumentException: Cannot subclass final class class
org.jasig.cas.CentralAuthenticationServiceImpl
    at
org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:209)
    at
org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:110)
    at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:433)
    at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:334)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1368)
    at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
    ... 38 more
Caused by: java.lang.IllegalArgumentException: Cannot subclass final class
class org.jasig.cas.CentralAuthenticationServiceImpl
    at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:446)
    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:197)
    ... 44 more


Thanks for any help or comment.

-
Behrooz


On Tue, Apr 22, 2008 at 5:37 PM, Scott Battaglia <[EMAIL PROTECTED]>
wrote:

> Behrooz,
>
> Can you provide more details on this? We have people using these features
> without any problems.
>
> -Scott
>
> On Mon, Apr 21, 2008 at 8:11 AM, Behrooz Nobakht <
> [EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I have migrated to CAS 3.2.1 from 3.0.6.
>>
>> I use the following frameworks:
>>
>> * Spring 2.5
>> * Acegi 1.0.6
>> * Hibernate 3.2.5 (=> CGLib dependent)
>> * CAS 3.2.1
>>
>> As I found out, for security reasons, some of the classes in CAS have been
>> coded as *final* such as *DefaultServicesManagerImpl*, *
>> DefaultTicketRegistryCleaner* and *CentralAuthenticationServiceImpl
>>
>> *On the other side, as there exists Hibernate and CGLib, so the default
>> Proxy Manager will delegate to CGLib.
>>
>> These two cause problems:
>>
>> * Some of the final classes mentioned above have used [EMAIL PROTECTED]
>> * CGLib needs to proxy the classes
>> * The classes above are either *final* or have *no default constructor*.
>> * CGLib throws an exception complaining the above ones.
>>
>> I would be happy for any comment.
>>
>> Thanks,
>> Behrooz Nobakht
>>
>>
>>
>>
>> _______________________________________________
>> Yale CAS mailing list
>> [email protected]
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
>
>
> --
> -Scott Battaglia
> PGP Public Key Id: 0x383733AA
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to