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编码后如果还是报错,把所有中文注释去掉即可。
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编码后如果还是报错,把所有中文注释去掉即可。
相关文章推荐
- java调用.net(c#) dll(利用jacob)
- eclipse maven中的jetty插件启动报错
- java根据经纬度坐标计算两点的距离算法
- JAVA File类
- Spring Boot 打开jsp页面 乱码解决方法
- Java Iterator, ListIterator 和 foreach语句使用
- java web开发知识(一)
- java推荐使用枚举定义常量
- Eclipse IDE 使用技巧 (Eclipse工作空间小技巧)(自己的一些学习笔记和心得,记录下来,备忘录和复习使用)
- WebService学习——使用CXF编写WebService服务端
- java ssl编程
- 【错误记录】eclipse,android,logcat日志无法打印,真机调试
- 地宫取宝—题解
- Java JavaEE JavaSE JavaME JavaWEB 之间的区别与联系
- Java 监听器
- spring的bean在什么时候实例化
- Spring 4.x 新特性:泛型依赖注入
- Android Studio 如何像eclipse一样查看函数的形参列表,返回值,以及提示信息.
- Java String equals方法解析
- Enjoy Java