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 求数学坐标画圆以及直线的算法
  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决