首页 新闻 会员 周边 捐助

springmvc +mybatis 运行错误

0
[已解决问题] 解决于 2012-11-24 10:49

2012-11-19 02:57 INFO  o.s.b.f.s.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e458c2: defining beans [jdbcTemplate,transactionManager,sqlSessionFactory,busTrackDao,clientDao,clientRechargeDao,configureDao,dataTJDao,districtDao,passageDao,rightDao,searchDao,systemDao,userDao,userLoginLogDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,propertyConfigurer,dataSource,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,busTrackManager,clientManager,clientRechargeManager,configureManager,dataTJManager,districtManager,passageManager,rightManager,searchManager,systemManager,userManager]; root of factory hierarchy
2012-11-19 02:57 ERROR o.s.w.c.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'busTrackManager' defined in file [D:\Tomcat 6.0\webapps\rtw_admin\WEB-INF\classes\com\rightway\admin\service\BusTrackManager.class]: Initialization of bean failed; nested exception is java.lang.ExceptionInInitializerError
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872) ~[org.springframework.context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423) ~[org.springframework.context-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) ~[org.springframework.web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) ~[org.springframework.web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) [catalina.jar:na]
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) [catalina.jar:na]
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) [catalina.jar:na]
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) [catalina.jar:na]
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) [catalina.jar:na]
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) [catalina.jar:na]
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) [catalina.jar:na]
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) [catalina.jar:na]
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) [catalina.jar:na]
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) [catalina.jar:na]
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) [catalina.jar:na]
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:na]
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) [catalina.jar:na]
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:na]
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) [catalina.jar:na]
 at org.apache.catalina.core.StandardService.start(StandardService.java:516) [catalina.jar:na]
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:na]
 at org.apache.catalina.startup.Catalina.start(Catalina.java:566) [catalina.jar:na]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_21]
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_21]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_21]
 at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.6.0_21]
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) [bootstrap.jar:na]
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) [bootstrap.jar:na]
Caused by: java.lang.ExceptionInInitializerError: null
 at org.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:228) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:170) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) ~[org.springframework.aop-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1418) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[org.springframework.beans-3.0.2.RELEASE.jar:3.0.2.RELEASE]
 ... 35 common frames omitted
Caused by: java.lang.ClassCastException: net.sf.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$7fb24d72 cannot be cast to net.sf.cglib.core.KeyFactory
 at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) ~[cglib-2.1_3.jar:na]
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) ~[cglib-2.1_3.jar:na]
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) ~[cglib-2.1_3.jar:na]
 at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) ~[cglib-2.1_3.jar:na]
 at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) ~[cglib-2.1_3.jar:na]
 ... 44 common frames omitted

android-susu的主页 android-susu | 菜鸟二级 | 园豆:204
提问于:2012-11-19 15:11
< >
分享
最佳答案
0

映射关系出问题了。

奖励园豆:5
爱吃皮皮虾 | 初学一级 |园豆:54 | 2012-11-22 16:48

谢谢回答,映射应该没有问题的,我在本地没有问题,在服务器上不行,

现在解决了,我用到了jfreechart的jar包,里面有个servlet.jar,我将这个jar删除了,至今没有再出错

android-susu | 园豆:204 (菜鸟二级) | 2012-11-24 10:40
其他回答(1)
0
mabatis 命令行工具
https://github.com/typ0520/mybatis-cli
tong__ | 园豆:202 (菜鸟二级) | 2015-09-06 20:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册