The reference to entity "characterEncoding" must end with the ';' delimiter.

<property name="url" value="jdbc:mysql://localhost:3306/ceshi?useUnicode=true&characterEncoding=utf8" />

一个正常的MySQL配置却一直报错:

The reference to entity "characterEncoding" must end with the ‘;‘ delimiter.

逐步深究出在xml配置文件中需要替换转译的几个符号:

在xml文件中有以下几类字符要进行转义替换:

需要转译符号  >  <  ‘  "  &
转译对象 &gt; &lt; &apos; &quot; &amp;

The reference to entity "characterEncoding" must end with the ';' delimiter.

时间: 2024-08-06 07:56:11

The reference to entity "characterEncoding" must end with the ';' delimiter.的相关文章

报错The reference to entity &quot;characterEncoding&quot; must end with the &#39;;&#39; delimiter

The reference to entity "characterEncoding" must end with the ';' delimiter 数据源配置时加上编码转换格式后出问题了: The reference to entity "characterEncoding" must end with the ';' delimiter 这个错误就是 context.xml中设置数据源链接URL的问题 <context-param> <par

Caused by: org.xml.sax.SAXParseException: The reference to entity &quot;characterEncoding&quot; must end with the &#39;;&#39; 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.XMLError

The reference to entity &quot;characterEncoding&quot; must end with the &#39;;&#39;

在配置数据库连接池数据源时,本来没有错误,结果加上编码转换格式后eclipse突然报错: 这是怎么回事? 经过查询,发现这个错误其实很好解决. 首先,原因是: .xml文件中 ‘ & ’字符需要进行转义!!! 看到这里,其实已经恍然大悟,那么,这个字符 ‘ & ’ 需要怎么转义呢?看下面这张表: 在xml文件中有以下几类字符要进行转义替换: 所以,我们在xml文件中不能直接写 ‘ & ’ 字符,而需要写成 ‘ & ’ <?xml version="1.0&q

在配置XML时报的The reference to entity &quot;dataSource&quot; must end with the &#39;;&#39; delimiter错误

<?xml version="1.0" encoding="UTF-8"?> <ECharts> <element>http://localhost:8080/EChartDynamic/DEcharts_bar1?flag=teacher_sex&dataSource=UTADB</element> <element>http://localhost:8080/EChartDynamic/DEch

对接第三方平台JAVA接口问题推送和解决

前言 本节所讲为实际项目中与第三方对接出现的问题最后还是靠老大解决了问题以此作为备忘录,本篇分为三小节,一小节解析Java加密接口数据,二小节解析XML文件需注意问题,最后一节则是请求Java Soap协议接口.因为第三方平台都是采用JAVA语言,所以这种情况应该对大家有所帮助. DES加密/解密Java接口 关于Java中序列化为XML文件就不搞了,我们首先需要讲解的是关于加密问题,由于是第三方是采用的DES加密,所以我们只讲解DES,有很多人可能有疑问了,这不过时了么且不安全,不必纠结,这个

Value &#39;0000-00-00&#39; can not be represented as java.sql.Date

Value '0000-00-00' can not be represented as java.sql.Date 时间 2014-07-30 09:00:50 ITeye-博客 原文  http://josh-persistence.iteye.com/blog/2098415 主题 Java SQL java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

Exception in thread “main” java.sql.SQLException: The server time zone value ‘?й???????’ is unrecognized or represents more than one time zone.

Exception in thread "main" java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) t

java面试题大全

java面试笔试题大汇总     第一,谈谈final, finally, finalize的区别. 最常被问到. 第二,Anonymous Inner Class (匿名内部类) 是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)? 第三,Static Nested Class 和 Inner Class的不同,说得越多越好(面试题有的很笼统). 第四,&和&&的区别. 这个问得很少. 第五,HashMap和Hashtable的区

大数据常见错误

1.用./bin/spark-shell启动spark时遇到异常:java.net.BindException: Can't assign requested address: Service 'sparkDriver' failed after 16 retries! 解决方法:add export SPARK_LOCAL_IP="127.0.0.1" to spark-env.sh 2.java Kafka producer error:ERROR kafka.utils.Util