zeng7064 2009-07-27 16:18
浏览 152
已采纳

关于spring和hibernate配置问题

出现的错误提示

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'datasourecsunit' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Bean property 'datasourecsunit' 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 'datasourecsunit' of bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Bean property 'datasourecsunit' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
////////////////////////////
applicationContext.xml






com/joy/po/Users.hbm.xml









希望尽快得到答案,谢谢

  • 写回答

1条回答 默认 最新

  • java_xh 2009-07-27 17:10
    关注


    变量名错误 应该为dataSource 因为在SessionFactory中对于的setter方法是指向dataSource的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 spring后端vue前端
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题