解决java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor问题
hibernate整合spring当在spring配置文件中加入如下代码
<!--2.配置事务属性,需要事务管理器-->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!--3.配置事务切点,并把切点和事务属性关联起来-->
<aop:config>
<aop:pointcut expression="execution(* com.cqupt.sh.service.*.*(..))" id="txPointcut"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut"/>
</aop:config>
在运行测试类,就报错。
NoClassDefFoundError错误一般是少加了什么jar包
错误原因:缺少com.springsource.org.aopalliance-1.0.0.jar
解决方法,在lib路径下加入缺少对应的jar包问题解决
解决java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor问题的更多相关文章
- 1.spring异常:Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr ...
- 【开发笔记】java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
在进行"spring的声明式事务管理配置"的时候,抛出该异常. 错误原因: 缺少aopalliance.jar包. 事务管理配置如下: <!-- #######5.sprin ...
- 使用spring中遇到"java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor"问题
项目中缺少aopalliance的jar包,下载一个相应的jar加入项目中就可以解决问题. 下载链接:http://www.java2s.com/Code/Jar/a/Downloadaopallia ...
- Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Fai ...
- Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法
贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans ...
- java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
今天在使用动态代理时,遇到了如下问题,报错 java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice 下面是完整的报错信息: 一月 , :: ...
- hibernate 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.xxx 这类的问题
<!-- 解决 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.intern ...
- 解决java.lang.NoClassDefFoundError: org.jdom.Content
报错:java.lang.NoClassDefFoundError: org.jdom.Content 解决办法: 更新lib目录下的jdom.jar 至最新版本.
- 【转】怎么解决java.lang.NoClassDefFoundError错误 ,以及类的加载机制
转自http://blog.csdn.net/jamesjxin/article/details/46606307 前言 在日常Java开发中,我们经常碰到java.lang.NoClassDefFo ...
随机推荐
- z-index注意事项
1. z-index只对定位元素有效(如position:absolute!) 2. 被覆盖的元素将无法触发其鼠标相关事件.(个人经验,可能有例外.) 3. 无法通过z-index使父级覆盖子级,如果 ...
- luffy后端之跨域corf的解决方法
跨域CORS 我们现在为前端和后端分别设置两个不同的域名 window 系统: C:\Windows\System32\drivers\etc\host linux/mac系统: /etc/hosts ...
- 00-自测4. Have Fun with Numbers
Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, wit ...
- 【MySQL】【1】表中存在重复记录,删除保留其中一条
--删除题库(TABLE_Q )中,标题(TITLE )和类型(TYPE )都相同的数据,仅保留ID最小的一条 DELETE TABLE_Q FROM TABLE_Q, ( ) T2 WHERE TA ...
- tornado 异步
引言 注:正文中引用的 Tornado 代码除特别说明外,都默认引用自 Tornado 4.0.1. tornado.gen 模块是一个基于 python generator 实现的异步编程接口.通过 ...
- Parse error: syntax error, unexpected end of file in * 的解决办法
这个原因很简单,就是你的php语法错误. 在你的php代码种出现了<? ?> 标准的是<?php ?>
- oracle查看列数据类型
select * from user_tab_columns where table_name = upper('表名')
- 【转】C# string数组转int数组
//字符串数组(源数组) string[] sNums = new[] {"1", "2"}; //整型数组(目标数组) int[] iNums; //转换方法 ...
- 整合elk(1)(十二)
elk 简介 Elasticsearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等. Logstash是 ...
- How to import a GitHub project into Eclipse
Assuming you have created a project in GitHub, these are the steps to import it into Eclipse. First, ...