[ERROR] [2017-12-28 14:42:39][org.springframework.web.context.ContextLoader]Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hotelDao' defined in file [C:\apache-tomcat-7.0.52\webapps\4G\WEB-INF\classes\spring-dao.xml]: Cannot resolve reference to bean 'datastore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datastore' defined in file [C:\apache-tomcat-7.0.52\webapps\4G\WEB-INF\classes\spring-morphia.xml]: Cannot resolve reference to bean 'morphia' while setting bean property 'morphia'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'morphia' defined in file [C:\apache-tomcat-7.0.52\webapps\4G\WEB-INF\classes\spring-morphia.xml]: Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
maven项目打包发布到本地tomcat 启动报错
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
10条回答 默认 最新
- dreamyzf2017 2017-12-28 10:21关注
名称或ID为:morphia 的bean初始化失败,原因:出现了IncompatibleClassChangeError 异常,而morphia对应的class 可能由于maven依赖包的缘故出现了多个版本导致冲突,检查该class类是否出现在多个jar包中。如果有超过1个jar包文件包含该类,修改maven的依赖配置并重新打包。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报