首页 > 代码库 > 编码问题Invalid byte 3 of 3-byte UTF-8 sequence.
编码问题Invalid byte 3 of 3-byte UTF-8 sequence.
1.Configuration problem: Failed to import bean definitions from URL location [classpath:spring/*Bean.xml]
2.Parsing XML document from file [D:\Program Files (x86)\Tomcat1\webapps\kissflovewebsite
\WEB-INF\classes\spring\NormalBean.xml];
nested exception is java.io.UTFDataFormatException: Invalid byte 3 of 3-byte UTF-8 sequence.
出现这个异常无非是编码问题,可以按下面步骤依次排除异常:
1、检查抛错的那个xml文件,查看里面是否有中文,有中文把中文删掉是可以解决问题的。
2、如果中文是有用不能删的内容,那可以把<?xml version="1.0" encoding="UTF-8"?>改成<?xml version="1.0" encoding="gbk"?>
3.BeanFactory not initialized or already closed - call ‘refresh‘ before accessing beans via the ApplicationContext
这里其实可以看出是bean配置文件出了问题、在向上观察、是编码出现问题、依上解决
编码问题Invalid byte 3 of 3-byte UTF-8 sequence.
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。