Initialization of Bean failed; Nested exception is ORG.SPRINGFRAMEWORK.AOP.FRAMEWORK.AOPCONFIGEXCEP

Source: Internet
Author: User
Tags aop
Information: Closing Hibernate sessionfactory
Exception in thread "main" Org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Testservice ' defined in file [E:\Users\chen\workspace\OA\WebRoot\WEB-INF\classes\com\jing\test\TestService.class]: Initialization of Bean failed; Nested exception is Org.springframework.aop.framework.AopConfigException:Cannot proxy target class because CGLIB2 are not Available. Add CGLIB to the class path or specify proxy interfaces.
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:480)
At Org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run ( abstractautowirecapablebeanfactory.java:409)
At java.security.AccessController.doPrivileged (Native Method)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:380)
At Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory.java:264)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:222)
At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:261)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:185)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:164)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:429)
At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:728)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:380)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( classpathxmlapplicationcontext.java:139)
At Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( CLASSPATHXMLAPPLICATIONCONTEXT.JAVA:83)
At Com.jing.test.springtest.<init> (springtest.java:9)
At Com.jing.test.SpringTest.main (springtest.java:27)
caused By:org.springframework.aop.framework.AopConfigException:Cannot proxy target class because CGLIB2 is not availabl E. Add CGLIB to the class path or specify proxy interfaces.
At Org.springframework.aop.framework.DefaultAopProxyFactory.createAopProxy (defaultaopproxyfactory.java:67)
At Org.springframework.aop.framework.ProxyCreatorSupport.createAopProxy (proxycreatorsupport.java:106)
At Org.springframework.aop.framework.ProxyFactory.getProxy (proxyfactory.java:110)
At Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy ( abstractautoproxycreator.java:490)
At Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary ( abstractautoproxycreator.java:365)
At Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization ( abstractautoproxycreator.java:325)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization (abstractautowirecapablebeanfactory.java:361)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1344)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:473)

... More


Missing Cglib-nodep-2.1_3.jar package, exception elimination after import

Cglib-nodep-2.1_3.jar role refer to the following blog

http://blog.csdn.net/tsun7263/article/details/4595509

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.