SpringWar 2015-03-27 04:20 采纳率: 0%
浏览 1886

使用SSH框架,出现BeanCreationException错误,纠结了两天了,求大神指导!

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceActionBean' defined in ServletContext resource [/WEB-INF/bean.xml]: Cannot resolve reference to bean 'serviceDao' while setting bean property 'serviceDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceDao' defined in ServletContext resource [/WEB-INF/bean.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.swu.dao.impl.ServiceDao]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceDao' defined in ServletContext resource [/WEB-INF/bean.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.swu.dao.impl.ServiceDao]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.swu.dao.impl.ServiceDao]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

各层的代码如下
图片说明

图片说明

图片说明

  • 写回答

2条回答 默认 最新

  • 大河行脚 2015-03-27 04:24
    关注

    你的setter和getter方法检查检查

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?