The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".
开发中,总有一下奇奇怪怪的问题
完整的错误就不贴了,异常提示:
hibernate.xml] is invalid; nested exception is org.xml.sax.SAXParseException:
The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".
org.xml.sax.SAXParseException:
The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".
简单来说,就是你的配置文件中有问题,具体什么问题,得直接一个一个排除。
可能性排除:
1、标签没有闭合
##检查标签,最好按照格式把标签都规范好。
2、账号或者秘钥错误
##确认连接数据库的账号、密码、库、ip、驱动都正确(总一下你想象不到的情况)
3、数据源ID配置没有对应上(可能比较大)
##确认你的dataSource和sessionFactory配置的对应上
4、标签写法不规范(可能性为0.1)
<ref local="sessionFactory"/> 都换成 <ref bean="sessionFactory"/>
spring-4.*不支持local了。
The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".的更多相关文章
- The content of element type "beans" must match "(description?,(import|alias|bean)*)
The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...
- The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-s
<struts> <!-- 配置为开发模式 --> <constant name="struts.devMode" value="t ...
- The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv
在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...
- mybatis项目启动报错 The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".
启动项目报错 2018-02-26 17:09:51,535 ERROR [org.springframework.web.context.ContextLoader] - Context initi ...
- Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".
今天在mybatis的mapper映射配置文件中遇到了这样的问题,困扰了我3个小时: Multiple annotations found at this line: - The content of ...
- The content of element type "package" must match "(result-types?,interceptors?...
错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...
- The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,
错误:配置web.xml时,出现红色叉叉,提示 The content of element type "web-app" must match "(icon?,disp ...
- 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
[转]The content of element type "configuration" must match "(properties?,settings?,typ ...
随机推荐
- UVA - 10635 LIS LCS转换
白书例题,元素互不相同通过哈希转换为LIS求LCS #include<iostream> #include<algorithm> #include<cstdio> ...
- Android 调整图标和字体大小
1. Root 2. 进system,找到build.prop 3. 用RE管理器,编辑 ro.sf.lcd_density=320, 后面的数值随意调整,越大图标越大,不要太贪心,图标变大会显示不全 ...
- ssh无密码登录和scp无密码拷贝
目的:在A主机上无密码登录B主机 方法: A主机生成密钥:ssh-keygen -t rsa 将密钥复制到B主机:cat ~/.ssh/id_rsa.pub | ssh root@B 'cat > ...
- ORACLE--12C--多租户体系架构概念
一,概念 1,何为多租户? 官网链接: 飞机直达>> 多租户这个概念并不是12C的新特性,而是体系架构,多租户架构使得oracle 数据库成为了一个多租户的容器数据库,也就是contain ...
- LINUX学习之一:
学好linux的基础:C语言(GNU C语言与GCC):硬件基础:熟悉操作系统内核代码,熟悉多线程和网络知识.分驱动开发(驱动程序模型即框架)和应用程序开发,目标是驱动开发 驱动开发特点: 不能使用标 ...
- 周记1——WebSocket入门
一周复一周,时间过得飞快,每个周末都是很开心却又很彷徨.开心的是不用工作,彷徨的是自己这周学到了什么.自身的技能有没有提高.如何应对这个日新月异的社会... 本周的工作的开发IM(即时聊天)模块,要用 ...
- jQuery中的DOM操作——《锋利的JQuery》
jQuery封装了大量DOM操作的API,极大提高了操作DOM节点的效率. 1.查找节点 通过我们上一节介绍了JQuery选择器,可以非常轻松地查找节点元素.不过,这时得到的是jQuery对象,只能使 ...
- C# 定制特性
一.初识特性 特性(attribute)是被指定给某一声明的一则附加的声明性信息. 设计类型的时候可以使用各种成员来描述该类型的信息,但有时候我们可能不太愿意将一些附加信息放到类的内部,因为这样,可能 ...
- [转]How to use IHttpContextAccessor in static class to set cookies
本文转自:http://stackoverflow.com/questions/37329354/how-to-use-ihttpcontextaccessor-in-static-class-to- ...
- 分支结构case……end
语法: case when 条件1 then 结果1 when 条件2 then 结果2 ……….. else 其它结果 end 执行顺序: 条件1成立执行结果1 条件2成立执行结果2 如果所有的wh ...