Li中清
2017-03-19 23:31
三月 19, 2017 11:27:09 下午 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
三月 19, 2017 11:27:09 下午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.4.Final}
三月 19, 2017 11:27:09 下午 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
三月 19, 2017 11:27:09 下午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
三月 19, 2017 11:27:09 下午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
三月 19, 2017 11:27:09 下午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
三月 19, 2017 11:27:10 下午 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
三月 19, 2017 11:27:10 下午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: Student.hbm.xml
写了路径后就是这样
你自己的路径不对呀,这个是我的项目的,路径包含包名的,希望能帮到你...
我也是这个错误,楼主找到解决方法了么??
运行后,就是那个错误,求解,谢谢
package Stu;
import java.util.Date;
public class Students {
private int id;
private String sname;
private String gender;
private Date birthday;
private String address;
public Students(){
}
public Students(int id, String sname, String gender, Date birthday, String address) {
// super();
this.id = id;
this.sname = sname;
this.gender = gender;
this.birthday = birthday;
this.address = address;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSname() {
return sname;
}
public void setSname(String sname) {
this.sname = sname;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Override
public String toString() {
return "Students [id=" + id + ", sname=" + sname + ", gender=" + gender + ", birthday=" + birthday
+ ", address=" + address + "]";
}
}
hibernate.properties not found 目前信息太少,可能是你没有这个文件.
试着把完整信息发出来...
Hibernate初探之单表映射
74810 学习 · 793 问题
相似问题