我用ecilpse+myecilpse 做一个程序,当运行到
Session session = HibernateSessionFactory.getSession();这条代码时
就报错:%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: entity class not found: CustomerInfo
我是创建了这个实体类,但是我没有调用过,为什么报这个错?
高手指点!!我只有10分了
------解决方案--------------------
你的 HibernateSessionFactory.java中 private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml ";hibernate.cfg.xml存放路径正确吗。
------解决方案--------------------
你的与CustomerInfo类相关的映射文件有错误。
<class name= "com.entity.TblBsDictType--这个地方的路径不对 ">
</class>
检查一下.hbm.xml配置文件,应该可以解决