您的位置:首页 > 其它

crm客户管理系统BeanCreationException

2013-03-21 16:30 218 查看
今天我在配置crm客户管理系统时,一直错:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CstLostDAO'

defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'CstLostService' while setting bean

property 'cstLostService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '

CstLostService' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.

NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer Caused by: org.springframework.beans.factory.

BeanCreationException: Error creating bean with name 'CstLostService' defined in class path resource [applicationContext.xml]: I

nitialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer

Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer

整的相当郁闷,在网上找答案,说是jar包冲突,不管怎么删就删一直弄不好。

最后我就想,反正是包的冲突,干脆我就直接加到lib文件下面,这样就不需要引入myeclipse的hibernate、spring和struts包了,这样也就不会有jar版本冲突的问题了,所以我就把项目引入的三个包都删了,自己把那些需要的包都放在了lib下面,然后在tomcat上部署就成功了,但是点击进去系统时,又发现不能query,原因就是那个项目的*.hbm.xml,是用myeclipse自动生成的,所以我们必须把*.hbm.xml里面的文件<class name="com.sanqing.po.CstManager"
table="cst_manager" schema="dbo" catalog="db_crm">改成<class name="com.sanqing.po.CstManager" table="cst_manager" >,就可以了,要记得吧所以的*.hbm.xml改掉哦!所以由myeclipse自动生成了*.hbm.xml,真是害死人啊!

下面就是那些包(记得不要再引入hibernate spring struts三个lib哦)!lib的链接地址http://download.csdn.net/detail/huwei1991/5166658
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: