Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify pr

原创 2014年12月17日 14:13:10
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [C:\myeclipseenvironment\workspace\springworkspace\Spring_019_Spring_Hibernate_Transaction_Annotation\bin\com\spring\service\UserService.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is 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.spring.service.UserServiceTest.testAdd(UserServiceTest.java:21)
    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


问题解决:缺少jar包 cglib-2.1.3.jar 

相关文章推荐

Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify pr

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService'...

Mybatis延迟加载问题( Cannot enable lazy loading because CGLIB is not available)

错误原因: Cause: java.lang.IllegalStateException: Cannot enable lazy loading because CGLIB is not avail...

class path resource [com/cn/bonc/mapping/] cannot be resolved to URL because it does not exist

Caused by: java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpat...

Microsoft Office Excel cannot open or save any more documents because there is not enough available

Microsoft Office Excel (0x800A03EC) .NET导出Excel遇到的80070005错误的解决方法: 检索 COM 类工厂中 CLSID 为 {00024500-...

Spring: proxy-target-class 决定 用 CGlib 还是 JDK AOP 来生成代理

package salesdepart.service.app; import org.springframework.context.*; import org.springframework.co...

class path resource [META-INF/xfire/services.xml] cannot be opened because it does not exist

如图所示,错误就是找不到那个service.xml 但是仔细找找,那个文件确确实实躺在那儿的。那是什么原因了,别人告诉我这个要看Class path。System.getProperty("java...

Spring问题:class path resource [org.spring/applicationContext.xml] cannot be opened because it does no

2014-05-07 19:10:08,841 ERROR [org.springframework.web.context.ContextLoader] - org.springframewor...
  • fcytxdy
  • fcytxdy
  • 2014年05月07日 19:21
  • 13036

Selected SVN connector library is not available or cannot be loaded

1、错误描述The following data will be sent: ------ STATUS ------ pluginId org.eclipse.team.sv...

Could not generate CGLIB subclass of class编译时出错

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating b...

error C2558: class 'Driver' : no copy constructor available or copy constructor is declared 'explici

mutex::scoped_lock lock(io_str_data);---->mutex::scoped_lock(io_str_data); 我的问题是:把mutex::sc...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify pr
举报原因:
原因补充:

(最多只允许输入30个字)