org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/classes/Context-Dao.xml]:Invocation of init method failed;
nested exceptin is org.hibernate.PropertyNotFoundException: Could not find a setter for property type in class com.bs.model.TechnicalType Caused by:
org.hibernate.PropertyNotFoundException:Could not find a setter for property type in class com.bs.model.TechnicalType
程序我不太会 ~~帮帮忙啊

解决方案 »

  1.   

    org.hibernate.PropertyNotFoundException:Could not find a setter for property type in class com.bs.model.TechnicalType
    这个TechnicalType类里确实set方法
      

  2.   

    com.bs.model.TechnicalType这个类缺少set方法,LZ先去加上看看
      

  3.   

    set..方法是不是被你写错了,或者搞成private了?
      

  4.   

    getter和setter方法 啊  应该是这的额毛病
      

  5.   

    Context-Dao.xml里面对于com.bs.model.TechnicalType类的配置中,配置了type属性,但是类中没有setType()方法
      

  6.   

    nested exceptin is org.hibernate.PropertyNotFoundException: Could not find a setter for property type in class com.bs.model.TechnicalType
    根据异常看,问题极大可能是对应一个property,hibernate无法找到合适的getter/setter,需要注意的getter/setter方法的定义需要符合JavaBean的约束,访问修饰符public不是必须的,即使属性的访问修饰符为private,protected,hibernate同样可以通过放射来为其设置属性值。
      

  7.   

    谢谢各位兄弟姐妹了~~问题解决了  
    我把Model 又手写了一遍~~谢谢 了 ~~~~~