MyException - 我的异常网
当前位置:我的异常网» J2EE » org.springframework.beans.factory.BeanInitializa

org.springframework.beans.factory.BeanInitializationException]

www.MyException.Cn  网友分享于:2013-11-12  浏览:1557次
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下去看看

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有