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 ...
随机推荐
- hibernateUtil类
package com.test.Util; import org.hibernate.SessionFactory; import org.hibernate.cfg.AnnotationConfi ...
- [转] 如何批量删除Docker中已经停止的容器
[From]https://blog.csdn.net/csdn_duomaomao/article/details/78587103 方法一: #显示所有的容器,过滤出Exited状态的容器,取出这 ...
- [转] Node.js的线程和进程
[From] http://www.admin10000.com/document/4196.html 前言 很多Node.js初学者都会有这样的疑惑,Node.js到底是单线程的还是多线程的?通过本 ...
- linux系统编程之(一) 信号量
信号量 一.什么是信号量 信号量的使用主要是用来保护共享资源,使得资源在一个时刻只有一个进程(线程)所拥有. 信号量的值为正的时候,说明它空闲.所测试的线程可以锁定而使用它.若为0,说明 它被占用,测 ...
- PIE SDK线元素的绘制
1. 功能简介 在数据的处理中会用到线元素的绘制,目前PIE SDK支持ILineSymbol的线元素的绘制,LineSymbol对象是用于修饰线状对象的符号,它包括CartographicLineS ...
- python学习12-反射 判断函数与方法(转载)
一.三个内置函数 1.issubclass(a, b) 判断a类是否是b类的子类 class Foo: pass class Zi(Foo): pass class Sun(Zi): passpri ...
- method reference
import java.util.Arrays; import java.util.List; import java.util.function.Function; import java.util ...
- php中的$_GET如何获取带有“#”的参数
<?php echo $_GET['key']; ?> 当url为http://test.com/c.php?key=999时,正常输出:999 当url为http://test.com/ ...
- Linux下Makefile的automake生成全攻略--转
http://www.yesky.com/120/1865620.shtml 作为Linux下的程序开发人员,大家一定都遇到过Makefile,用make命令来编译自己写的程序确实是很方便.一般情况下 ...
- 面试题 数据库sql
一.建表的结构和数据,在sqlserver直接用就行了 USE [test] GO /****** Object: Table [dbo].[TEACHER] Script Date: 05/16/2 ...