博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hiberante4 反常
阅读量:6279 次
发布时间:2019-06-22

本文共 6586 字,大约阅读时间需要 21 分钟。

hot3.png

[代码] [Java]代码 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'topicDao' defined in class path resource [ApplicationContext.xml]: Initialization of bean failed;  ; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class dao.TopicDao]: Common causes of this problem include using a final class or a non-visible class; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.ClassCastException-->java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType	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.(ClassPathXmlApplicationContext.java:139)	at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)	at test.springTest.addTopic(springTest.java:46)	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.runChild(BlockJUnit4ClassRunner.java:76)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)	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.runners.ParentRunner.run(ParentRunner.java:236)	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)	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)Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class dao.TopicDao]: Common causes of this problem include using a final class or a non-visible class; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.ClassCastException-->java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType	at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:207)	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)	... 33 moreCaused by: net.sf.cglib.core.CodeGenerationException: java.lang.ClassCastException-->java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)	at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:640)	at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)	at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)	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:201)	... 40 moreCaused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType	at dao.BaseHibernateDao.(BaseHibernateDao.java:26)	at dao.TopicDao.(TopicDao.java:5)	at dao.TopicDao$$EnhancerByCGLIB$$86152e1f.()	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)	at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)	... 48 more ;

转载于:https://my.oschina.net/u/947963/blog/110303

你可能感兴趣的文章
VMware 上网的三种方式
查看>>
backtrack5使用notepad++
查看>>
JSON-lib框架,转换JSON、XML
查看>>
UITableView常见问题
查看>>
优化Linux 的内核参数来提高服务器并发处理能力
查看>>
同步与异步、阻塞与非阻塞
查看>>
Python操作mysql数据库
查看>>
Tomcat中JVM内存溢出及合理配置
查看>>
输液导致白细胞过低,只能先停一下补输液了。
查看>>
Linux 用户和组权限图示
查看>>
VMware workstation -- 实验环境搭建系列(三) 使用Host-Only方式组建虚拟局域网
查看>>
IO中同步、异步与阻塞、非阻塞的区别
查看>>
[置顶] ARM处理器学习之--GPIO操作篇(gnu link script)
查看>>
我的友情链接
查看>>
Mysql按条件计数的几种方法
查看>>
Weinre《调试使用》调试Mobile Web
查看>>
表格控件 Spread for WinForms 7 新特性-中文本地化增强
查看>>
编程这件小事儿之Java篇:Java四个核心概念
查看>>
Picor Cool-Power ZVS 降压稳压器介绍
查看>>
[git] 已经push的commit如何修改message
查看>>