The reference to entity "characterEncoding" must end with the ';' delimiter
来源:互联网 发布:壁虎java基础视频下载 编辑:程序博客网 时间:2024/04/27 15:32
Caused by: org.xml.sax.SAXParseException: The reference to entity "characterEncoding" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.validateResource(PersistenceUnitReader.java:187)
at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.readPersistenceUnitInfos(PersistenceUnitReader.java:138)
... 48 more
JPA persistence xml 中报错的写法:
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8" />
正确的写法:
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8" />
在xml文件中有以下几类字符要进行转义替换:
<
<
小于号
>
>
大于号
&
&
和
'
'
单引号
"
"
双引号
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter
- .The reference to entity "characterEncoding" must end with the ';' delimiter.
- The reference to entity "characterEncoding" must end with the ';' delimiter
- The reference to entity "characterEncoding" must end with the ';' delimiter.
- Linux x64 Hadoop-2.4.1配置-解决错误Unable to load native-hadoop library for your platform
- Arcgis for Javascript实现两个地图的联动
- 创建处理文档索的引类:IndexProcessor
- 08-1. 求一批整数中出现最多的个位数字(20)
- 【寄存器】
- The reference to entity "characterEncoding" must end with the ';' delimiter
- 【有效地址传送指令 LEA 】
- PAT 07-3. 数素数 (20)
- NYOJ题目1011 So Easy[II](数学几何)
- 【OJ】Red and black poj1979 // acmclub.com 6659
- HDU 1300 -Pearls
- PAT 07-1. 换个格式输出整数 (15)
- HPUX上oracle10g安装与卸载简记
- SQL Server中的事务与锁