问答详情
源自:-

运行时报错INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final},求大神解决


//hibernate.cfg.xml的内容

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-configuration PUBLIC

          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<property name="connection.username">root</property>

<property name="connection.password">root</property>

<property name="connection.driver_class">com.mysql.jdbc.Driver</property>

<property name="connection.url">jdbc:mysql:///hibernate?useUnicode=true&amp;characterEncoding=UTF-8</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<mapping resource="root/hibernate/Students.hbm.xml"/>

</session-factory>

</hibernate-configuration>

//报的错误是:

十月 13, 2015 9:36:57 上午 org.hibernate.annotations.common.Version <clinit>

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

十月 13, 2015 9:36:57 上午 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

十月 13, 2015 9:36:57 上午 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

十月 13, 2015 9:36:57 上午 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

十月 13, 2015 9:36:57 上午 org.hibernate.cfg.Configuration configure

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

十月 13, 2015 9:36:57 上午 org.hibernate.cfg.Configuration getConfigurationInputStream

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


提问者:慕移动8041616 2015-10-13 09:42

个回答

  • 追梦21
    2017-06-02 13:25:20

    我把lib里的jar包换了一下 就可以用了  换成了和老师做的一样的

  • yuming2013
    2016-05-08 11:13:38

    我们的问题出现的一样啊

  • 笑问红尘
    2016-04-30 13:25:49

    楼主,我和你遇到一样的问题,请问你最后解决了没?

  • Happy_Imp
    2016-01-22 11:53:52

    INFO: HHH000206: hibernate.properties not found


    没找到你的配置文档,你要把hibernate.properties.xml放到src目录下哦~