错误:java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException

  spring整合mubatis启动报错:

   解决办法:一看這个报错是因为缺少包,这里缺少包:aspectjweaver.jar 這个包是spring aop 所用到的包,在网上下载导入這个包即可,下载地址:http://download.csdn.net/detail/luojiming1990/5432831;

   错误代码:

 2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'itemsMapper' and 'com.kjczwl.ssm.mapper.ItemsMapper' mapperInterface
2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'itemsMapperCustom' and 'com.kjczwl.ssm.mapper.ItemsMapperCustom' mapperInterface
2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'orderdetailMapper' and 'com.kjczwl.ssm.mapper.OrderdetailMapper' mapperInterface
2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'ordersMapper' and 'com.kjczwl.ssm.mapper.OrdersMapper' mapperInterface
2017-04-01 09:15:46 [org.mybatis.spring.mapper.ClassPathMapperScanner]-[DEBUG] Creating MapperFactoryBean with name 'userMapper' and 'com.kjczwl.ssm.mapper.UserMapper' mapperInterface
2017-04-01 09:15:46 [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]-[INFO] Loading properties file from class path resource [db.properties]
2017-04-01 09:15:46 [org.springframework.web.context.ContextLoader]-[ERROR] Context initialization failed
java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethods(Class.java:1810)
at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:159)
at org.springframework.context.annotation.ConfigurationClassUtils.isLiteConfigurationCandidate(ConfigurationClassUtils.java:104)
at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:87)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:240)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:684)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 24 more

错误:nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor 

运行环境:jdk1.7.0_17 + tomcat 7 + eclipse

    spring整合mybatis启动时候出现這个错误:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/spring/applicationContext-transaction.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

  解决办法:

    缺少包:aopalliance.jar

      前往地址: http://sourceforge.net/projects/aopalliance/files/ 下载包拷到你的工程里面去,如果在以后看到“NoClassDefFoundError:xxxxxxxx”一般都是缺少什么包,仔细看看你的工程是否缺少什么包之类的。

    aopalliance.jar作用:这个包是AOP联盟的API包,里面包含了针对面向切面的接口,通常Spring等其它具备动态织入功能的框架依赖此包。

错误:Configuration problem: Id is required for element 'advice' when used as a top-level tag

   spring整合mybatis启动报错:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Configuration problem: Id is required for element 'advice' when used as a top-level tag

    解决办法:字面意思已经很明确的当“advice”這个标签作为顶级元素时候,這个标签需要id属性,

        

spring 整合Mybatis 《报错集合,总结更新》的更多相关文章

  1. Spring学习总结(六)——Spring整合MyBatis完整示例

    为了梳理前面学习的内容<Spring整合MyBatis(Maven+MySQL)一>与<Spring整合MyBatis(Maven+MySQL)二>,做一个完整的示例完成一个简 ...

  2. Spring学习总结(五)——Spring整合MyBatis(Maven+MySQL)二

    接着上一篇博客<Spring整合MyBatis(Maven+MySQL)一>继续. Spring的开放性和扩张性在J2EE应用领域得到了充分的证明,与其他优秀框架无缝的集成是Spring最 ...

  3. 分析下为什么spring 整合mybatis后为啥用不上session缓存

    因为一直用spring整合了mybatis,所以很少用到mybatis的session缓存. 习惯是本地缓存自己用map写或者引入第三方的本地缓存框架ehcache,Guava 所以提出来纠结下 实验 ...

  4. 2017年2月16日 分析下为什么spring 整合mybatis后为啥用不上session缓存

    因为一直用spring整合了mybatis,所以很少用到mybatis的session缓存. 习惯是本地缓存自己用map写或者引入第三方的本地缓存框架ehcache,Guava 所以提出来纠结下 实验 ...

  5. spring整合mybatis错误:class path resource [config/spring/springmvc.xml] cannot be opened because it does not exist

    spring 整合Mybatis 运行环境:jdk1.7.0_17+tomcat 7 + spring:3.2.0 +mybatis:3.2.7+ eclipse 错误:class path reso ...

  6. spring整合mybatis(hibernate)配置

    一.Spring整合配置Mybatis spring整合mybatis可以不需要mybatis-config.xml配置文件,直接通过spring配置文件一步到位.一般需要具备如下几个基本配置. 1. ...

  7. spring 整合 mybatis 中数据源的几种配置方式

    因为spring 整合mybatis的过程中, 有好几种整合方式,尤其是数据源那块,经常看到不一样的配置方式,总感觉有点乱,所以今天有空总结下. 一.采用org.mybatis.spring.mapp ...

  8. Mybatis学习(六)————— Spring整合mybatis

    一.Spring整合mybatis思路 非常简单,这里先回顾一下mybatis最基础的根基, mybatis,有两个配置文件 全局配置文件SqlMapConfig.xml(配置数据源,全局变量,加载映 ...

  9. Spring整合MyBatis 你get了吗?

    Spring整合MyBatis 1.整体架构dao,entity,service,servlet,xml 2..引入依赖 <dependencies> <dependency> ...

随机推荐

  1. 独立ip的优势

    独立ip的建站优势   我想很多人都想知道,那我就在这里给大家简单介绍下独立ip的优势有那些.                    网站设计是需要很多专业知识的结合,整站不是那么容易就可以设计完成的 ...

  2. swift3.0 屏幕截图并且保存到本地相册

    所要截取的对象 var bg_view: UIView! 截取并且保存的代码如下 UIGraphicsBeginImageContextWithOptions(bg_view.frame.size, ...

  3. <经验杂谈>C#生成条形码

    虽然二维码满天飞,但也不能忘了条形码,本篇介绍可以在C#中使用的1D/2D编码解码器.条形码的应用已经非常普遍,几乎所有超市里面的商品上面都印有条形码: 条形码的标准: 条形码的标准有ENA条形码.U ...

  4. 点击文字选中radio

    <html><body><form action="" name="form1" method="post"& ...

  5. H5滚动轮播插件

      概述 JRedu 随着前端技术的发展,越来越多的H5技术被应用到实际开发中,尤其是js插件更是无处不用,本章节我们主要分享下如何去自己封装一个滚动轮播插件. 1效果图如下: 2主要功能   支持超 ...

  6. Git 深入浅出

    如果你是一个开发人员,想用上这个世界上目前最先进的分布式版本控制系统,那么,赶快开始学习吧!(耐心读下去,收获满满) Git是什么? Git是目前世界上最先进的分布式版本控制系统(没有之一). Git ...

  7. android 学习 ListView使用补充

    前面两篇学习适配器的时候用的就是listview,主要是简单的添加,今晚在看了下listview滚动状态事件和动态加载数据,一个小demo. listview的滚动状态主要有三种,onScrollSt ...

  8. OpenCV探索之路(二十三):特征检测和特征匹配方法汇总

    一幅图像中总存在着其独特的像素点,这些点我们可以认为就是这幅图像的特征,成为特征点.计算机视觉领域中的很重要的图像特征匹配就是一特征点为基础而进行的,所以,如何定义和找出一幅图像中的特征点就非常重要. ...

  9. IIS 发布 处理程序“ExtensionlessUrlHandler-Integrated-4.0”在其模块列表中有一个错误模块“ManagedPipelineHandler”

    IIS上部署MVC网站,打开后500错误:处理程序"ExtensionlessUrlHandler-Integrated-4.0"在其模块列表中有一个错误模块"Manag ...

  10. StringBulider简单用法

    StringBuild的是个动态对象,可直接拼加上字符串:而string对象的步骤:先初始化对象并赋值了,而后在拼加字符串时,先要创建需要拼加的字符串,然后再拼加,所以这就是StirngBuild远比 ...