问答详情
源自:1-6 生成表结构

生成报表出现错误,怎么解决呢

一月 09, 2017 12:27:12 上午 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

一月 09, 2017 12:27:12 上午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.21.Final}

一月 09, 2017 12:27:12 上午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

一月 09, 2017 12:27:12 上午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

一月 09, 2017 12:27:13 上午 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

一月 09, 2017 12:27:13 上午 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

一月 09, 2017 12:27:13 上午 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: entity/Students.hbm.xml


提问者:慕沐2686865 2017-01-09 00:34

个回答

  • 慕粉3162071
    2017-01-09 13:15:00
    已采纳

    要贴JUnit栏的Failure Trace

  • 邓帅
    2017-02-26 23:18:48

    我也有同样的问题。。。

  • 慕粉3162071
    2017-01-09 15:56:49

    没找到你的“entity/Students.hbm.xml”配置文件,看看是不是路径写错了

  • 慕沐2686865
    2017-01-09 14:59:46

    org.hibernate.MappingNotFoundException: resource: entity/Students.hbm.xml not found

    at org.hibernate.cfg.Configuration.addResource(Configuration.java:740)

    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:2197)

    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:2169)

    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2149)

    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2102)

    at org.hibernate.cfg.Configuration.configure(Configuration.java:2017)

    at org.hibernate.cfg.Configuration.configure(Configuration.java:1996)

    at entity.testStudents.testSchemaExport(testStudents.java:16)