码上敲享录 > Hibernate常见问题解答 > Caused by: java.lang.ClassNotFoundException: Could not load requested class

Caused by: java.lang.ClassNotFoundException: Could not load requested class

上一章章节目录下一章 2018-03-25已有5479人阅读 评论(0)

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


0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交