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. 1.spring异常:Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr ...

  2. 【开发笔记】java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

    在进行"spring的声明式事务管理配置"的时候,抛出该异常. 错误原因: 缺少aopalliance.jar包. 事务管理配置如下: <!-- #######5.sprin ...

  3. 使用spring中遇到"java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor"问题

    项目中缺少aopalliance的jar包,下载一个相应的jar加入项目中就可以解决问题. 下载链接:http://www.java2s.com/Code/Jar/a/Downloadaopallia ...

  4. Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor

    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Fai ...

  5. 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 ...

  6. java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

    今天在使用动态代理时,遇到了如下问题,报错 java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice 下面是完整的报错信息: 一月 , :: ...

  7. 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 ...

  8. 解决java.lang.NoClassDefFoundError: org.jdom.Content

    报错:java.lang.NoClassDefFoundError: org.jdom.Content 解决办法: 更新lib目录下的jdom.jar 至最新版本.

  9. 【转】怎么解决java.lang.NoClassDefFoundError错误 ,以及类的加载机制

    转自http://blog.csdn.net/jamesjxin/article/details/46606307 前言 在日常Java开发中,我们经常碰到java.lang.NoClassDefFo ...

随机推荐

  1. 【洛谷p1313】计算系数

    (%%%hmr) 计算系数[传送门] 算法呀那个标签: (越来越懒得写辽)(所以今天打算好好写一写) 首先(ax+by)k的计算需要用到二项式定理: 对于(x+y)k,有第r+1项的系数为:Tr+1= ...

  2. windows下如何通过git bash获取gitlab ssh公钥

    Gitlab1. 安装git,从程序目录打开 "Git Bash" 2. 键入命令:ssh-keygen -t rsa -C "email@email.com" ...

  3. http认证方式,工程部分实现

    学习过程中,被boss批评,要求去复习http协议,因此找了相关资料做成一个系列:对于http认证方式不清楚的可以参考我的上一篇文章 http认证方式https://www.cnblogs.com/j ...

  4. Seagull License Server 9.4 SR3 2781 完美激活(解决不能打印问题)

    BarTender 9.4 SR3完美激活方法 网上下载的BarTender 9.4大部分不能正常打印,已经测试过了,完美解决无法打印,界面停留在“无法打印,出现正在试图连接到seagull lice ...

  5. Mysql优化系列--Innodb引擎下mysql自身配置优化-转

    原文链接:http://www.cnblogs.com/kevingrace/p/6133818.html 谢谢楼主 1.简单介绍 InnoDB给MySQL提供了具有提交,回滚和崩溃恢复能力的事务安全 ...

  6. 大数据分析引擎Apache Flink

    Apache Flink是一个高效.分布式.基于Java实现的通用大数据分析引擎,它具有分布式 MapReduce一类平台的高效性.灵活性和扩展性以及并行数据库查询优化方案,它支持批量和基于流的数据分 ...

  7. Oracle 11g 异机恢复参考文档

      原库 目标库 操作系统 CentOS 6.4 CentOS 6.4 主机名 sht-sgmhadoopnn-01 sht-sgmhadoopnn-02 IP 172.16.101.55 172.1 ...

  8. 基本数据类型list,tuple

    一. 列表 1. 列表是一个可变的数据类型 列表由[]来表示, 每一项元素使用逗号隔开. 列表什么都能装. 能装对象的对象. 列表可以装大量的数据 列表是有序的 2. 列表的索引和切片 列表和字符串一 ...

  9. [LeetCode] 20. Valid Parentheses ☆

    转载:https://leetcode.windliang.cc/leetCode-20-Valid%20Parentheses.html 描述 Given a string containing j ...

  10. linux 文件解锁

    //文件 sudo chmod 777 文件名 //文件夹内的文件 sudo chmod 777 文件夹/ * //遍历文件夹下的所有文件 sudo chmod -R 777 文件夹/ *