1

我的配置文件如下:

<?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="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
    <property name="hibernate.connection.password">root$12</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost/mysql</property>
    <property name="hibernate.connection.username">root</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
    <mapping resource="com.sst.Course.hbm.xml"/>
  </session-factory>
   </hibernate-configuration>

在创建控制台配置时加载数据库驱动程序时出错。

4

1 回答 1

0

尝试用 com.mysql.jdbc.Driver 替换

并在您的控制台配置中验证数据库连接(驱动程序,jar,...)

于 2012-11-15T10:20:56.633 回答