No setter found for property *(property)in class *(class)
大概意思是什麼屬性在什麼類中沒有找到。
http://stackoverflow.com/questions/19748013/no-setter-found-for-property-in-class
可以參考這邊文章。
在配置ApplicationConext.xml文件是報這樣的錯誤。
解決的辦法檢查下你的set***是否出現錯誤,如果檢查不出,建議可以把原來方法刪除,通過編輯器自動生成,就是右鍵-source-gennertate set and get
2、
Multiple annotations found at this line: - DOCTYPE declaration not closed
錯誤參考http://bbs.csdn.net/topics/220026259
居然剪切然後複製上去可以了,神奇啊。
3、
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
使用java jdk1.8 出現的問題。
http://blog.csdn.net/xtj332/article/details/41650779
原因說是1。8版本不穩定
4、log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
找不到log4j.properties配置文件
http://bbs.csdn.net/topics/320261792
5、在Query query = session.createQuery("from table");
然後調試下,query是爲空的。
原因是createQuery方法拼接有點問題吧,使用其他createSQLQuery替代,就可以了。
百度解決方法:Query query = session.createSQLQuery("from table").addEntity(Student.class);
List<Student> list = query.list();便可以通過遍歷list實現輸出