`

Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the clas

 
阅读更多
2012-8-23 13:07:09 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@bf32c: startup date [Thu Aug 23 13:07:09 CST 2012]; root of context hierarchy
2012-8-23 13:07:09 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [ApplicationContext-mybatis.xml]
2012-8-23 13:07:10 org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
信息: Loading properties file from class path resource [jdbc.properties]
2012-8-23 13:07:10 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e6ff0d: defining beans [forumMybatisTemplateDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,announcementService,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.SqlSessionTemplate#0,org.mybatis.spring.mapper.MapperScannerConfigurer#0,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,announcementMybatisDao]; root of factory hierarchy
2012-8-23 13:07:10 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e6ff0d: defining beans [forumMybatisTemplateDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,announcementService,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sqlSessionFactory,org.mybatis.spring.SqlSessionTemplate#0,org.mybatis.spring.mapper.MapperScannerConfigurer#0,transactionManager,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,announcementMybatisDao]; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'announcementService' defined in file [E:\Workspaces\java\songjy\songjy-sm-1.0\target\classes\cn\com\songjy\sm\service\mybatis\AnnouncementService.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:527)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at cn.com.songjy.sm.test.Test.main(Test.java:39)
Caused by: 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.aop.framework.DefaultAopProxyFactory.createAopProxy(DefaultAopProxyFactory.java:67)
	at org.springframework.aop.framework.ProxyCreatorSupport.createAopProxy(ProxyCreatorSupport.java:104)
	at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362)
	at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1461)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	... 11 more



缺少jar包cglib-2.2.2.jar(见附件)
分享到:
评论
1 楼 Xujian0000abcd 2015-11-09  
Thanks...

相关推荐

    CGLIB2 is not available&org.objectweb.asm.Type

    关于Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.和 java.lang.ClassNotFoundException: org.objectweb.asm.Type错误的解决方法: 就是...

    cglib-nodep

    org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces 从异常信息可以看出是cglib的问题...

    Senfore_DragDrop_v4.1

    4) Add the Drag and Drop Component Suite components directory to your library path. 5) Load the demo project group: demo\dragdrop_delphi.bpg for Delphi 5 and 6 demo\dragdrop_bcb4.bpg for C++ ...

    CgLib2.2 API

    CgLib2.2 API cglib Packages net.sf.cglib.beans net.sf.cglib.core net.sf.cglib.proxy net.sf.cglib.reflect net.sf.cglib.transform net.sf.cglib.transform.impl net.sf.cglib.util

    java CGLIB动态代理代理支持包。

    在java编程使用CGLIB做动态代理时需要CGLIB依赖包支持,没有这个支持包,当导入import net.sf.cglib.proxy.Enhancer;或者import net.sf.cglib.proxy.MethodProxy;类似包时会提示错误,所以分享出来同大家共勉。

    cglib-2.2.2-javadoc.chm

    自制CHM版的API文档,带索引。 注:如果各位下载后打开或无法显示页面,请在CHM文件右键—属性—解除锁定即可。

    cglib.jar源码

    spring AOP中的cglib代理所依赖的jar包cglib.jar源码 net.sf.cglib.proxy

    servlet2.4doc

    The default behavior of this method is to call addCookie(Cookie cookie) on the wrapped response object. addCookie(Cookie) - Method in interface javax.servlet.http.HttpServletResponse Adds the ...

    cglib-3.3.0.jar

    CGLib (Code Generation Library) 是一个强大的,高性能,高质量的Code生成类库。它可以在运行期扩展...CGLib 比 Java 的 java.lang.reflect.Proxy 类更强的在于它不仅可以接管接口类的方法,还可以接管普通类的方法。

    cglib-full-2.0.2 jar包

    cglib-full-2.0.2.jarCGLib (Code Generation Library) 是一个强大的,高性能,高质量的Code生成类库。...CGLib 比 Java 的 java.lang.reflect.Proxy 类更强的在于它不仅可以接管接口类的方法,还可以接管普通类的方法。

    java常用设计模式及JDK与CGLIB实现动态代理区别(源码)

    package org.sg.sgg.mode.proxy.jdkProxy.trendProxy2; /** * java JDK实现动态代理 * @author * */ public class Test2 { public static void main(String[] args) { UserService userService = new ...

    cglib-full.jar

    使用CGLib库需要导入的Jar包,官网下载,亲测可用! cglib - Byte Code Generation Library ... It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

    cglib-nodep-2.1_3.jar

    使用cglib动态代理需要的jar包, net.sf.cglib.proxy.MethodInterceptor;

    计算机网络第六版答案

    Since the available bandwidth of the shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users transmit simultaneously, the bandwidth required will be 3Mbps ...

    influx-proxy-2.5.7-linux-amd64.tar.gz

    influx-proxy-2.5.7-linux-amd64.tar.gz

    proxy.jsp、proxy.ashx、proxy.php、proxy.config

    esri.config.defaults.io.proxyUrl is not set所缺文件 proxy.jsp、proxy.ashx、proxy.php、proxy.config

    Linux.Firewall.And.Proxy.Server.-.Howto

    Linux.Firewall.And.Proxy.Server.-.Howto

    Proxy SwitchOmega 2.5.15 Chrome离线插件(谷歌浏览器proxy插件)

    Google Chrome插件: Proxy ...2. 拖拽Proxy-SwitchyOmega_2_5_15_0.crx到扩展管理界面 3. 安装 原始安装路径: https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif?hl=en

    UPX_net.upx.proxy.browser_102_69.0.3497.100_.apk

    UPX_net.upx.proxy.browser_102_69.0.3497.100_.apk

    Proxy-SwitchyOmega-Chromium-2.5.15.zip

    Proxy-SwitchyOmega-Chromium-2.5.15.zip

Global site tag (gtag.js) - Google Analytics