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配置文件出了問題、在向上觀察、是編碼出現問題、依上解決