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

测试不会成功???

十一月 08, 2016 10:26:32 上午 org.hibernate.annotations.common.Version <clinit>

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

十一月 08, 2016 10:26:32 上午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

十一月 08, 2016 10:26:32 上午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

十一月 08, 2016 10:26:32 上午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

十一月 08, 2016 10:26:32 上午 org.hibernate.cfg.Configuration configure

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

十一月 08, 2016 10:26:32 上午 org.hibernate.cfg.Configuration getConfigurationInputStream

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

十一月 08, 2016 10:26:32 上午 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!

十一月 08, 2016 10:26:32 上午 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: Student.hbm.xml


提问者:世事如棋_2016 2016-11-08 10:38

个回答

  • 陷入编程无法自拔的江北
    2016-11-08 15:55:38

    一:hibernate.cfg.xml文档中有某个地方写错(具体的要看Junit报的错)

    二:hibernate.cfg.xml文件和Student.hbm.xml文件没有同级存放(都要在src下)