编码问题Invalid byte 3 of 3-byte UTF-8 sequence.

1.Configuration problem: Failed to import bean definitions from URL location [classpath:spring/*Bean.xml]java

2.Parsing XML document from file [D:\Program Files (x86)\Tomcat1\webapps\kissflovewebsiteweb

\WEB-INF\classes\spring\NormalBean.xml];spring

 nested exception is java.io.UTFDataFormatException: Invalid byte 3 of 3-byte UTF-8 sequence.app

出现这个异常无非是编码问题,能够按下面步骤依次排除异常:webapp

一、检查抛错的那个xml文件,查看里面是否有中文,有中文把中文删掉是能够解决问题的。编码

二、若是中文是有用不能删的内容,那能够把<?xml version="1.0" encoding="UTF-8"?>改为<?xml version="1.0" encoding="gbk"?>spa

3.BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContextorm

这里其实能够看出是bean配置文件出了问题、在向上观察、是编码出现问题、依上解决xml

相关文章
相关标签/搜索