maven 配置web项目时遇到的一些问题
2013-10-25 13:01
627 查看
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adServiceImpl': Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.ece.ec.dao.face.AdDAO com.ece.ec.service.ad.AdServiceImpl.adDao; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adDao' defined in class path resource [applicationConfig.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
sessionFactory' defined in class path resource [applicationConfig.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
org.hibernate.annotations.common.reflection.ReflectionManager
检查pom配置文件引用的hibernate-core 和hibenate-annotations版本是否一致,
本人开始就因为一个3.3.1.GA 一个3.3.0.GA导致上面的错,找了好长时间才发现
Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
这个错误的解决办法是 添加 hibernate required 包javassist-3.12.1.GA.jar
在pom.xml文件中添加
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
'adServiceImpl': Injection of autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.ece.ec.dao.face.AdDAO com.ece.ec.service.ad.AdServiceImpl.adDao; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'adDao' defined in class path resource [applicationConfig.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
sessionFactory' defined in class path resource [applicationConfig.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
org.hibernate.annotations.common.reflection.ReflectionManager
检查pom配置文件引用的hibernate-core 和hibenate-annotations版本是否一致,
本人开始就因为一个3.3.1.GA 一个3.3.0.GA导致上面的错,找了好长时间才发现
Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
这个错误的解决办法是 添加 hibernate required 包javassist-3.12.1.GA.jar
在pom.xml文件中添加
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
相关文章推荐
- 使用Maven构建web项目遇到的一些问题
- web项目中遇到的Maven包依赖冲突问题解决
- 建立maven的web项目可能会遇到的一个问题Cannot detect Web Project version.
- 解决用eclipse对maven-web项目进行debug时遇到 source not found问题
- 遇到问题---java---git下载的maven项目web用tomcat发布时不带子项目
- [项目过程中所遇到的各种问题记录]ORM篇——使用NHibernate配置对象实体的一些小问题
- 基于maven的springMVC web项目的一些基本配置:
- 遇到问题---java---git下载的maven项目web用tomcat发布时不带子项目
- web项目部署到服务器遇到的一些问题
- 在eclipse使用maven构建web项目遇到的问题
- Intellij Idea导入非maven Web项目时遇到lib目录冲突的问题
- 关于【apache- tomcat- 5.5.15/conf /Catalina/localhost配置虚拟目录】时的一些问题。(配置web项目的方式不止一种,虚拟目录就是一个)
- 9.8 遇到的一些问题 maven部署项目,mysql区分大小写
- Linux下的python 配置项目环境遇到的一些问题
- web项目中遇到的Maven包依赖冲突问题解决
- Intellij Idea导入非maven Web项目时遇到lib目录冲突的问题
- MyEclipse中开发web项目遇到的一些问题
- 解决使用maven的java web项目导入或新建添加pom配置后出现的有关问题 -cannot be read or is not a valid ZIP file
- maven+idea 自动部署项目到linux服务器及遇到的一些问题
- 如何在云服务器上部署你的web项目和一些遇到的问题