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.更新我的项目,而后从新运行。

此次解决是清空缓存。