开发中,总有一下奇奇怪怪的问题

完整的错误就不贴了,异常提示:

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)*)".的更多相关文章

  1. The content of element type "beans" must match "(description?,(import|alias|bean)*)

    The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...

  2. The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-s

    <struts> <!-- 配置为开发模式 -->     <constant name="struts.devMode" value="t ...

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

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

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

  6. The content of element type "package" must match "(result-types?,interceptors?...

    错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...

  7. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

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

  9. 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    [转]The content of element type "configuration" must match "(properties?,settings?,typ ...

随机推荐

  1. 前端PostJosn,后端转化相应的类

    /// <summary> /// JsonPost特性类 /// </summary> [AttributeUsage(AttributeTargets.Method, In ...

  2. C#工具类之XmlNode扩展类

    using System; using System.Linq; using System.Xml; /// <summary> /// XmlNodeHelper /// </su ...

  3. PIE SDK图片元素的绘制

    1. 功能简介 在数据的处理中会用到图片元素的绘制,利用IPictureElement图片元素接口进行绘制,目前PIE SDK支持IPictureElement元素接口的绘制,下面对图片元素的绘制进行 ...

  4. 01-oracle限定查询-20190404

    关系型数据库和半结构化数据(xml文件) oracle12c:c代表云计算 PDB,CDB sql语句执行顺序: 第一步:from子句控制数据来源: 第二步:where子句使用限定符对数据行过滤: 第 ...

  5. (转)Linux SSH批量分发管理

    Linux SSH批量分发管理 原文:http://blog.51cto.com/chenfage/1831166 第1章 SSH服务基础介绍 1.1 SSH服务 1.1.1SSH介绍 SSH是Sec ...

  6. elasticsearch 2.4.0执行update的时候发现的一个问题

    请关注inline参数的变化 正确: POST /test/type1/1/_update{ "script" : { "inline": "ctx. ...

  7. 在NuoDB上运行Asterisk

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文来自云+社区翻译社,作者Hans362 您可能已经熟悉Asterisk,一个广泛部署的开源Telephony框架.如果你不太熟悉,你应该 ...

  8. 白话SpringCloud | 第八章:分布式配置中心的服务化及动态刷新

    前言 上一章节,简单介绍了分布式配置中心Spring Cloud Config的使用.同时,我们也遗漏了一些问题,比如如何配置实时生效,当服务端地址变更或者集群部署时,如何指定服务端地址?回想,在服务 ...

  9. 5、栅格布局:ion-grid

    /* --- html ----*/ <ion-content class="tabs"> <ion-grid> <h1>没有 warp 的 i ...

  10. C# this关键字的四种用法(转)

    用法一  this代表当前类的实例对象 namespace Demo { public class Test { private string scope = "全局变量"; pu ...