spring2.5 加了事务注解报错的解决
Spring 2.5 的包和所依赖的包加上 , 配置了数据库连接, 事务控制 , IBATIS 的 SQLMAP 配置 .
当在SERVICE前 加事务标记 @Transactional 后, 启动报错
2011-7-22 22:39:12 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userSRV': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.core.KeyFactory at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485) at java.security.AccessController.doPrivileged(Native Method) .............................................................. at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.core.KeyFactory at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
上网查得 , 是 CGLIB 的包冲突 , 因为同时加入了 cglib-2.2.jar 和 cglib-nodep-2.2.jar
删除 cglib-2.2.jar 保留 cglib-nodep-2.2.jar
错误解决. 事务成功.
相关推荐
spurity 2020-11-10
LeeLuffy 2020-10-16
DriveCar 2020-09-07
zjuwangleicn 2020-09-04
gamestart0 2020-08-15
loviezhang 2020-08-08
gaozhennan 2020-08-03
mcvsyy 2020-08-02
happinessaflower 2020-07-29
花落花开春去秋来 2020-07-29
牧场SZShepherd 2020-07-20
qingjiuquan 2020-07-18
zhanbuquan 2020-07-04
粗茶淡饭 2020-06-25
zbcaicai 2020-06-21
zhanbuquan 2020-06-21
花落花开春去秋来 2020-06-20
bluetears 2020-06-17
csdnlytPractice 2020-06-11
heniancheng 2020-06-10