问答详情
源自:1-11 通过Hibernate API编写访问数据库的代码

大神们求解


三月 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


提问者:Li中清 2017-03-19 23:31

个回答

  • Li中清
    2017-04-04 20:58:45

    http://img.mukewang.com/58e3985f0001617615930762.jpg

    写了路径后就是这样

  • 慕粉4039500
    2017-03-31 21:04:52

    http://img.mukewang.com/58de53cc0001b28506830351.jpg

    你自己的路径不对呀,这个是我的项目的,路径包含包名的,希望能帮到你...

  • 慕仔4221270
    2017-03-22 19:30:02

    我也是这个错误,楼主找到解决方法了么??

  • Li中清
    2017-03-20 21:11:11

    运行后,就是那个错误,求解,谢谢


  • Li中清
    2017-03-20 21:09:53

    http://img.mukewang.com/58cfd482000163f411120738.jpg

    http://img.mukewang.com/58cfd4830001122c08820600.jpg

    http://img.mukewang.com/58cfd4840001dd3904790254.jpg

    http://img.mukewang.com/58cfd48400017b9b09340492.jpg

    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 + "]";

    }


    }


  • 慕粉4039500
    2017-03-20 09:31:32

     hibernate.properties not found 目前信息太少,可能是你没有这个文件.

    试着把完整信息发出来...