org.hibernate.MappingException: entity class not found

http://hi.baidu.com/%BA%D7%D3%B0314/blog/item/fa850f8f7fbea7f2513d9286.html/cmtid/bb86a4f34567d45e342acc11

ssh整合时可能会遇到很多问题,常见的问题之一

        org.hibernate.MappingException: entity class not found

可能原因:若持久化类为:User.java

                   对应的hibernate映射文件为:User.hbm.xml

                  一般系统自动生成的映射文件为:

                        <hibernate-mapping>


                                    <class name="User" table="......

                                        .......

                       </hibernate-mapping>

                  要将class路径改为绝对路径。若User.java在包com.ssh.bean

                 则要改为<class name="com.ssh.bean.User" ......>

你可能感兴趣的:(java,Hibernate,bean,xml,ssh)