首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

org.springframework.beans.factory.BeanInitializationException]

2011-11-11 
struts+spring+hibernate整合问题(unable to proxy method) ---初学2008-11-21 11:22:48,328 WARN [org.sp

struts+spring+hibernate整合问题(unable to proxy method) ---初学
2008-11-21 11:22:48,328 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy. 
2008-11-21 11:22:48,328 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy. 
2008-11-21 11:22:48,328 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy. 
2008-11-21 11:22:48,343 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy. 
2008-11-21 11:22:48,359 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.


action注入到spring中报错。到调用hibernate中的save方法时抛出异常,数据不能正常保存到数据表里。

[解决办法]
struts-config.xml的配置呢?
[解决办法]
使用CGLIB的代理是需要类库支持的
可能是没有类库吧
把\spring-framework\lib\cglib下的jar包全部拷到工程的lib下去看看

热点排行