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

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

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. ModelSim使用教程

    参考[百度文库]

  2. oracle 备份恢复篇(四)---rman 单个数据文件

    一,环境背景

  3. C++的一些编程规范

    新规范的目标: 让代码排错更加简单 程序员专心于业务逻辑 将一些错误交给编译器处理 提高代码可维护性 逐步实现插件化 编码 使用array(QT下用QVarLengthArray)代替和vector代 ...

  4. 阿里云Tomcat运行shutdown.sh命令关闭时遇到的问题

    1.安装完成jdk之后,然后安装tomcat. tomcat安装成功后,进入tomcat的安装目录,找到bin所在的目录. 使用./startup.sh,启动tomcat; 使用./shutdown. ...

  5. 【Unity】工具类系列教程—— 代码自动化生成!

    转载自:https://zhuanlan.zhihu.com/p/30716595?utm_medium=social&utm_source=qq [为什么要做自动化工具] 工具类的创建是为了 ...

  6. Smart3D基础理论

    目录: 1. Smart3D发展进程 2. 硬件要求与建模原理 3. Smart3D建模优势 4.Smart3D的应用领域 5. Smart3D的软件组成 6. Samrt3D主控台概述 1. Sma ...

  7. Shader学习笔记

    Shader学习笔记 例子: Shader "SrfShader1"{ //定义显示在Inspector中的变量,并从Inspector中获取值 Properties{ _Colo ...

  8. js消息提示框插件-----toastr用法

     (本文系转载) 因为个人项目中有一个提交表单成功弹出框的需求,从网上找了一些资料,发现toastr这个插件的样式还是不错的.所以也给大家推荐下,但是网上的使用资料不是很详细,所以整理了一下,希望能给 ...

  9. 【XShell】xshell 中“快速命令集”的使用

    突然看到朋友的xshell比我多一个按钮,且一点,哈哈哈 ,实现了很炫酷的功能,耐不住好奇,问了一句,原来是快速命令集! 1.选择快速命令集(两种方法a&b) a:文件 > 属性 > ...

  10. Oracle 过程中变量赋值

    create or replace function get_sal1(id employees.employee_id%type) return number is sal employees.sa ...