关于Spring中applicationContext.xml配置错误“org/springframework/transaction/interceptor/TransactionInterceptor”的问题解决
问题描述:
在配置spring的applicationContext.xml中的默认事务管理器的时候可能会出现这样的错误:
Error occured processing XML 'org/springframework/transaction/interceptor/TransactionInterceptor'. See Error Log for more details
以下是xml配置:
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSourceID"></property>
</bean> <tx:annotation-driven transaction-manager="transactionManager" /> // 报错位置
此段配置意在采用“声明式事务管理”,并使用注解的形式。但是却报错了?
问题分析:
配置全都没错,那应该就是jar包的问题了
然后去官方文档中找,原来少了 aopalliance-1.0.jar ,和 aspectj.weaver-1.6.8.RELEASE.jar
这两个包和 注解实现声明式事务管理 有密切关系
解决办法:
引入 aopalliance-1.0.jar ,和 aspectj.weaver-1.6.8.RELEASE.jar
{注意:因为当使用myeclipse的“project facets”自动配置spring的时候 它默认引入的包只是spring的最小系统包,除非和hibernate、struts等框架一起引入才会有其他例如spring.jdbc这样的包,所以当要使用springmvc的时候,还是自己做一个完整的spring-mvc的“user library”比较方便}
关于Spring中applicationContext.xml配置错误“org/springframework/transaction/interceptor/TransactionInterceptor”的问题解决的更多相关文章
- web.xml中配置Spring中applicationContext.xml的方式
2011-11-08 16:29 web.xml中配置Spring中applicationContext.xml的方式 使用web.xml方式加载Spring时,获取Spring applicatio ...
- 在进行分布式框架搭建的过程中,出现问题advised by org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)?
今天在进行宜立方商城,进行文件配置的时间,遇到如下的问题,问题是:advised by org.springframework.transaction.interceptor.TransactionI ...
- spring的applicationContext.xml配置SessionFactory抛异常
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFa ...
- Spring 中使用XML配置方式和使用注解方式实现DI
Spring容器给我们提供了很好的环境,我们只关注主要业务即可,其他的无需关注太多.今天刚学的DI DI(Dependency Injection):依赖注入 使用XML配置文件完成依赖注入 1.1普 ...
- 第九篇:Spring的applicationContext.xml配置总结
在前面的一篇日志中,记录了web.xml配置启动的顺序,web启动到监听器ContextLoaderListener时,开始加载spring的配置文件applicationContext.xml(通常 ...
- Spring中applicationContext.xml详解
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- Spring中applicationContext.xml的bean里的id和name属性区别
转自:http://www.cnblogs.com/ztf2008/archive/2009/02/11/1388003.html <beans><bean id="per ...
- 模拟Spring中applicationContext.xml配置文件初始化bean的过程
package com.xiaohao.action; import java.io.File; import java.lang.reflect.Method; import java.util.C ...
- spring中的xml配置出处
随机推荐
- C的指针疑惑:C和指针8数组
]; ]; 上面申明两个数组,不能进行以下赋值 b = a; 你不能使用赋值符把一个数组的所有元素复制给另一个数组,必须使用一个循环,每次复制一个元素 数组和指针 ]; int *b; 声明一个数组, ...
- 这样才能使本地Mysql服务允许被外部主机连接(两步)
网上的N多方法都不全面,只有下面的第一步或第二步是不行的,必须同时执行下面两步操作: 修改mysql.user表 以root或debian-sys-maint身份登录mysql $ mysql -u ...
- 以About Us为范例在Zen cart中增加页面
1.在includes\languages\english\html_includes目录中新建文件define_about_us.php 2.在includes\templates\Your_tem ...
- 2016-2017 National Taiwan University World Final Team Selection Contest C - Crazy Dreamoon
题目:Statements Dreamoon likes algorithm competitions very much. But when he feels crazy because he ca ...
- Redhat 7.4更新为Centos7的yum并安装docker-ce
以下命令请在root下执行 #删除原有的yum rpm -qa|grep yum|xargs rpm -e --nodeps #install centos yum #wget http://mirr ...
- 论文笔记:CNN经典结构1(AlexNet,ZFNet,OverFeat,VGG,GoogleNet,ResNet)
前言 本文主要介绍2012-2015年的一些经典CNN结构,从AlexNet,ZFNet,OverFeat到VGG,GoogleNetv1-v4,ResNetv1-v2. 在论文笔记:CNN经典结构2 ...
- request.getQueryString()代表的含义
在jsp做分页的时候,有时候我们想获取get请求链接中的参数保留下来. 比如客户端发送 http://localhost/test.do?a=b&c=d&e=f 通过request.g ...
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3
Maven 导入项目时报错: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3 ...
- C/C++结构体总结
1 #include"iostream" 2 using namespace std; 3 4 struct TestStruct 5 { 6 ...
- 【虚拟机】linux 桥接模式 固定静态IP
1:在root用户下修改 2:进入root用户下 vim/etc/sysconfig/network-scripts/ifcfg-eth0 2.修改完保存退出 3.重启网络服务:service net ...