org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available

22,889 views
By Abhijit Ghosh on Nov 1, 2012 8:15:36 AM

Spring AOP uses either JDK dynamic proxies or CGLIB to create the proxy for a given target object. If the target object to be proxied, does not implement any interfaces then a CGLIB proxy will be created. In this situation if CGLIB is not present in the classpath following exception will be thrown

org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.

Tags:

About this 'Hello World' site

This site is mainly developed to share coding and technology learning experiences on java / j2ee based technologies.

Simple tutorials / codes have been shared to learn a new technology. Full source code is also available for download.