Error parsing XML: An invalid XML character (Unicode:0x1f) was found
出現錯誤:
Error parsing XML:XML InputStream(56) An invalid XML character (Unicode:0x1f) was found in the value of attribute "column" and element is "property".
問題出現的場景:
在springmvc框架中,新增一個表,然後利用hibernate建立一個對應的實體類和.hbm.xml檔案,最後在applicationContext.xml中配置完該.hbm.xml檔案後執行程式,出現上述紅色錯誤。
問題解決過程:
解讀錯誤訊息,說是該.hbm.xml檔案中一個property元素的column屬性發現非法字元。但是在myeclipse中檢視該.hbm.xml配置檔案一切正常,也沒有什麼非法字元。我將該檔案中的內容全部註釋掉都不行,依然報該錯誤,可見只要檔案中存在非法字元,無論註釋與否,都會識別並報錯。幾經折騰,最後無意將該檔案內容全部複製到notepad++軟體中,結果非法字元原形畢露,發現在某個property的column屬性中果然後"US"字樣的非法字元。按照正常邏輯,我在notepad++中將非法字元刪除,然後全部複製回myeclipse中,儲存再次執行,一起OK。
備註:在記事本中顯示不出來非法字元。
相關文章
- An invalid XML character (Unicode: 0x18) was foundXMLUnicode
- An invalid XML character (Unicode: 0x10) was found in the value of attributeXMLUnicode
- An invalid XML character (Unicode: 0x4) was found in the element content of theXMLUnicode
- 微信公眾號 報 An invalid XML character (Unicode: 0x1a) was found in the CDATA sectioXMLUnicode
- All About JAVA An invalid XML character (Unicode: 0xdd65) was found in the comment 錯誤JavaXMLUnicode
- Java - XML字元支援報錯An invalid XML characterJavaXML字元
- 對XML 進行 parse 時的Invalid Unicode character (0x0) 分析XMLUnicode
- Dom4j 讀 xml 時,遇到 xml 無效字元,報錯:An invalid XML characterXML字元
- Springboot Error parsing Mapper XMLSpring BootErrorAPPXML
- SAXParseException An invalid XML character 問題的解決ExceptionXML
- Parsing an XML Document with XPathXML
- not found service definition in jdonframework.xmlFrameworkXML
- com.badlogic.gdx.utils.SerializationException: Error parsing XML on line 1 nearExceptionErrorXML
- Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection alreadyErrorAPPXMLJavaException
- IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokensExceptionHTTP
- 急!!Error Parsing EJB file: Finder found in DD with no matching method.Error
- XML DOM Parse Error 物件概述XMLError物件
- XML ERROR 在咚懍斜XMLError
- DataPump Export (EXPDP) Fails With Error LPX-216 Invalid CharacterExportAIError
- xml問題請教:org.xml.sax.SAXParseException: Invalid encoding name "GBK".XMLExceptionEncoding
- JAXP 再述??Sun 的 Java API for XML Parsing,1.1 版(轉)JavaAPIXML
- 解析XML檔案時,無效的XML 字元 (Unicode: 0x7)異常處理XML字元Unicode
- Jsp Unescaped xml character報錯的解決辦法JSXML
- configure: error: xml2-config not found. Please check your libxml2 installationErrorXML
- error MSB8031 Building an MFC project for a non-Unicode character set is deprecatedErrorUIProjectUnicode
- XMLXML
- Python解析xml[xml.dom]PythonXML
- PHP之——configure: error: xml2-config not found. Please check your libxml2 installationPHPErrorXML
- Binary XML file line #2: Error inflatingXMLError
- Ubuntu 20.04 安裝 php-xml 模組(報錯:Class 'DOMDocument' not found )UbuntuPHPXML
- XML進階:Level 1 – XML簡介XML
- XML資料島(XML Data Island) (轉)XML
- XML入門指南(4)XML元素(轉)XML
- Xml解析XML
- XML操作XML
- 操作XMLXML
- xml 操作XML
- 已解決:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 問題