运行我的程序时出现错误。错误是:org.hibernate.HibernateException:未找到JDBC驱动程序类:com.mysql.jdbc.Driver。 驱动程序在那里......我不确定它是什么造成这种情况。有什么建议么?休眠问题
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/registrar</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<mapping resource="com/ths/entity/Course.hbm.xml"/>
<mapping resource="com/ths/entity/Student.hbm.xml"/>
<mapping resource="com/ths/entity/Enrollment.hbm.xml"/>
</session-factory>
</hibernate-configuration>
发布您的Hibernate配置。你有没有在类路径中引用驱动程序?我们需要更多信息来帮助你。 – 2011-01-28 17:12:04