`
chenzhou123520
  • 浏览: 4249675 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException

阅读更多

在项目中使用了Spring管理和配置事务,在启动tomcat时报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException
具体报错信息如下:
Error creating bean with name 'c3p0' defined in class path resource [config/spring/spring-pool.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException : Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'ermPoincCut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException : Error creating bean with name 'ermPoincCut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException

原因:是由于classpath下缺少了aspectjweaver.jar的缘故。
解决办法:在pom.xml中加入依赖信息
<dependency>
       <groupId> org.aspectj</groupId >
       <artifactId> aspectjweaver</artifactId >
       <version> 1.6.11</version >
</dependency>
 
分享到:
评论
3 楼 思念-悲伤 2016-01-04  
谢谢!有用
2 楼 spykerccc 2015-05-18  
感谢楼主分享
1 楼 kely39 2013-12-20  
一语中的,瞬间启动成功!

相关推荐

Global site tag (gtag.js) - Google Analytics