问题:ERROR [RMI TCP Connection(2)-127.0.0.1] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxService’ defined in file [E:…xml]: Cannot resolve reference to bean ‘xxDao’ while setting bean property ‘xxDaoDao’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxDao’: Post-processing of the FactoryBean’s object failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.alibaba.druid.support.spring.stat.DruidStatInterceptor] for bean with name ‘druid-stat-interceptor’ defined in URL [file:/E:/xx.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
个人解决方案:
1.除去检查web.xml,applicationContext.xml的bean注入配置外。
2.建议检查下tomcat配置文件,特别是把数据库配置到tomcat下conf中的context文件中的项目。
3.建议检查是否因druid.jar误配置到tomcat的lib包下。
ERROR:beans.factory.BeanCreationException: Error creating bean with name ‘xxService‘ defined in file
最新推荐文章于 2023-01-31 11:04:33 发布