Caused by: java.lang.ClassNotFoundException: Could not load requested class
解决方法:
hibernate.cfg.xml中的实体申明不正确,如下面的红色代码申明实体可能路劲不对等等
<session-factory>
<property name="myeclipse.connection.profile">
com.mysql.jdbc.Driver
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.username">root</property>
<property name="connection.url">
<![CDATA[jdbc:mysql://localhost:3306/pfmmis?useUnicode=true&characterEncoding=UTF-8]]>
</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<mapping class="pojo.SysUser" />
<mapping class="pojo.SysLog" />
</session-factory>
本文地址:http://www.yayihouse.com/yayishuwu/chapter/1112