<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/student</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property> <property name="hibernate.connection.pool_size">100</property> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.cache.use_query_cache">true</property>
<mapping resource="student.hbm.xml"/> </session-factory></hibernate-configuration>不知道是什么错误
发一个正确的你看看吧
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/student</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">root</property> <property name="hibernate.connection.pool_size">100</property> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.cache.use_query_cache">true</property>
<mapping resource="student.hbm.xml"/> </session-factory></hibernate-configuration>不知道是什么错误
发一个正确的你看看吧
configure()里面不放参数的话,程序会从当前路径下找,你可以指定一下路径。你配置文件放的地方有问题,导致找不到。
The up in the document preceding the root element must be well-formed.
仔细查看一下。