Error creating bean with name 'sessionFactory' defined
文章目录
Error creating bean with name 'sessionFactory' defined in class path resource [spring/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: entity class not found: com.zking.ssh.book.entity.Module
利用ssh开发项目,在用tomcat启动服务时报这个错误,仔细核实了相应包和类映射后,启动依然是报错。
解决办法:
1.如果是导入的项目,先重新配置所有的Configure build path依赖项,包括jdk,junit,tomcat等。
2.确保所有的jar包没问题,maven install试试。
3.清空所有的tomcat缓存,极有可能是缓存的问题。
4.更新项目,然后重新运行。
此次解决是清空缓存。

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论