配置Spring时出现如题这个错误,下面是xml的内容

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:tx="http://www.springframework.org/schema/tx"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  8. http://www.springframework.org/schema/context
  9. http://www.springframework.org/schema/context/spring-context-2.5.xsd
  10. http://www.springframework.org/schema/tx
  11. http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
  12. <context:component-scan base-package="com.erification.web" />
  13. <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
  14. <!-- results in a setDriverClassName(String) call -->
  15. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  16. <property name="url" value="jdbc:mysql://localhost:3306/erification"/>
  17. <property name="username" value="root"/>
  18. <property name="password" value="1"/>
  19. <!-- 连接池启动时的初始值 -->
  20. <property name="initialSize" value="1" />
  21. <!-- 连接池的最大值 -->
  22. <property name="maxActive" value="500" />
  23. <!-- 最大空闲值,当经过一个高峰后,连接池可以慢慢将一些用不到的连接释放,知道maxIdle为止 -->
  24. <property name="maxIdle" value="2" />
  25. <!-- 最小空闲值,当小于这个值时会去申请连接 -->
  26. <property name="minIdle" value="1" />
  27. </bean>
  28. <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  29. <property name="dataSource" ref="myDataSource" />
  30. <property name="mappingResources">
  31. <list>
  32. <value>com/erification/web/model/user.hbm.xml</value>
  33. </list>
  34. </property>
  35. <property name="hibernateProperties">
  36. <value>
  37. hibernate.dialect=org.hibernate.dialect.MySQLDialect
  38. hibernate.hbm2ddl.auto=update
  39. hibernate.show_sql=false
  40. hibernate.cache.use_second_level_cache=true
  41. hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
  42. hibernate.cache.use_query_cache=false
  43. </value>
  44. </property>
  45. </bean>
  46. <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" >
  47. <property name="sessionFactory" ref="sessionFactory" />
  48. </bean>
  49. <tx:annotation-driven transaction-manager="txManager"/>
  50. </beans>

求大神帮帮忙

1个回答

按赞数排序
FindBoy   2016.04.16 12:03

通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven'的更多相关文章

  1. 通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明

    启动Tomcat时报错,通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明,报错如下 1.从报错可以看到找不到元素   tx:annotation-driven ...

  2. Tomcat启动报错:“通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明“

    从报错信息就可以明显察觉到是xml配置文件出现的问题 <?xml version="1.0" encoding="UTF-8"?> <bean ...

  3. springMVC:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明

    转自:http://blog.csdn.net/tolcf/article/details/50845483 报错信息:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-drive ...

  4. nested exception is org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 56; cvc-complex-type.2.4.c通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  5. 通配符的匹配很全面, 但无法找到元素 'cache:advice' 的声明

    EB-INF\classes\spring-jdbc.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineN ...

  6. idea调试SpringMvc, 出现:”通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明“错误的解决方法

    调试json格式输出,出现以下错误: HTTP Status 500 - Servlet.init() for servlet HelloDispatcher threw exception   ty ...

  7. 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明

    通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明 错误原因是springmvc中的约束信息不对 <beans xmlns="http://w ...

  8. dubbo 常见错误 通配符的匹配很全面, 但无法找到元素 'dubbo:application' java.lang.reflect.MalformedParameterizedTypeException 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。 Unsupported major.minor version 52.0 (unable to l

    dubbo 常见错误 1. Caused by: java.lang.reflect.MalformedParameterizedTypeException 启动时报错,原因是dubbo 依赖 spr ...

  9. Spring:通配符的匹配很全面, 但无法找到元素 XXXXX' 的声明

    问题:配置Spring的时候容易发生如题的这样一个经常性的错误,错误如下(以context为例) org.springframework.beans.factory.xml.XmlBeanDefini ...

随机推荐

  1. Eclipse中Maven配置操作

    1.修改为自己的maven路径 2.对应的自己的仓库设置

  2. 2825 codevs危险的组合(递推)

    2825 危险的组合 时间限制: 1 s 空间限制: 64000 KB 题目等级 : 钻石 Diamond 题目描述 Description 有一些装有铀(用U表示)和铅(用L表示)的盒子,数量均足够 ...

  3. 控制input框输入非数字

    <input type="text" onkeyup="value=value.replace(/[^\d.]/g,'')">

  4. GMchess Linux下的中国象棋游戏

    gmchess,一款Linux下的中国象棋程序

  5. POJ3111(最大化平均值)

    K Best Time Limit: 8000MS   Memory Limit: 65536K Total Submissions: 8458   Accepted: 2163 Case Time ...

  6. Rails上传文件

    1.view <%= form_tag({:method =>"post",:controller =>"welcome",:action=& ...

  7. C Primer Plus学习笔记(三)- 字符串和格式化输入/输出

    从一个简单的例子开始 #include <stdio.h> int main() { char name[10]; printf("Input Your Name:\n" ...

  8. 2016.4.6 WinForm显示PDF两种方法

    1.最直接的方法,添加webbrowser控件 webb.Url = new Uri(path);可显示pdf控件. 如果需要在打开时跳转到某页,可用在路径后直接加#page=,例如webb.Url ...

  9. DDD学习笔录——简介领域驱动设计的实践与原则

    DDD在存在许多DDD模式的同时,也有大量实践和指导原则,这些都是DDD思想体系成功的关键. 1.专注于核心领域 DDD强调的是在核心子域付出最多努力的需要.核心子域是你的产品会成功还是会失败的差异化 ...

  10. [mpm_winnt:error] [pid 28120:tid 15980] (OS 10038)在一个非套接字上尝试了一个操作。 : AH00332: winnt_accept: getsockname error on listening socket, is IPv6 available?

    解决办法一: 可能是安装了某些程序修改了Winsock,使用netsh winsock reset 命令修复Winsock重启计算机即可! 解决办法二: 在httpd.conf文件中添加 Win32D ...