(转) Spring 3 报org.aopalliance.intercept.MethodInterceptor问题解决方法

本文记录了在使用Spring AOP过程中遇到的配置问题及其解决方案。主要介绍了因缺少特定jar包导致的问题,并提供了具体的jar包名称及下载链接。

http://blog.youkuaiyun.com/henuhaigang/article/details/13678023 转自优快云博客,因为一个jar包没引入困扰我好长时间 ,当时正在做spring AOP 的一个小测试,总在报错,最后发现自己是问题3,引入一个jar包得到了解决

一 开发环境:JDK5+Spring3.0.5+Myeclipse6.6+Tomcat6 
二 启动报错如下: 
1 Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] 
拷贝jar到WEB-INF/lib中加入:

org.springframework.transaction-3.0.5.RELEASE.jar  

2  Unexpected exception parsing XML document from file nested exception is java.lang.NoClassDefFoundError: org/springframework/aop/config/AopNamespaceUtils 
拷贝jar到WEB-INF/lib中加入:

org.springframework.aop-3.0.5.RELEASE.jar  

3 Unexpected exception parsing XML document from file nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor 
拷贝jar到WEB-INF/lib中加入:

aopalliance-1.0.jar  

下载地址:http://sourceforge.net/projects/aopalliance/files/ 
附件中已上传! 
参考地址: 
关于 Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法 
http://coolhorse168.iteye.com/blog/789511 

转载于:https://www.cnblogs.com/ScarecrowAnBird/p/7363710.html

在搭建spring项目时通常需要这些jar包 commons-logging-1.1.3.jar spring-aop-4.0.6.RELEASE.jar spring-beans-4.0.6.RELEASE.jar spring-context-4.0.6.RELEASE.jar spring-core-4.0.6.RELEASE.jar spring-expression-4.0.6.RELEASE.jar 在使用spring额外功能时 1 需要在xml文件中加入命名空间 可以在spring-framework-4.0.6.RELEASE\docs\spring-framework-reference\html 中搜索关键字查找配置 2 加入需要的jar包(依赖包) 由于没有引入 spring-aop-4.0.6.RELEASE.jar 引起的错误 org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/aop] Offending resource: class path resource [beans.xml] at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) 由于缺少依赖包 aspectjweaver-1.6.12.jar http://search.maven.org/remotecontent?filepath=org/aspectj/aspectjweaver/1.6.12/aspectjweaver-1.6.12.jar org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around 由于缺少依赖包 aopalliance-1.0.jar org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值