慕移动8041616
2015-10-13 09:42
//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&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
我把lib里的jar包换了一下 就可以用了 换成了和老师做的一样的
我们的问题出现的一样啊
楼主,我和你遇到一样的问题,请问你最后解决了没?
INFO: HHH000206: hibernate.properties not found
没找到你的配置文档,你要把hibernate.properties.xml放到src目录下哦~
Hibernate初探之单表映射
74800 学习 · 835 问题
相似问题