您的位置:首页 > 编程语言 > Java开发

spring.xml MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

2016-06-15 16:47 253 查看
MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

springmvc启动报错:

[code="xhtml"]org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring-db.xml]

Offending resource: class path resource [spring-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring-db.xml]; nested
exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 2 无效。

编码问题,确认<?xml version="1.0" encoding="UTF-8" ?> UTF-8编码后如果还是报错,把所有中文注释去掉即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: