Loading
Salesforce から送信されるメールは、承認済ドメインからのみとなります続きを読む

MuleSoft SAX Parser Error "Content is not allowed in prolog"

公開日: Mar 24, 2026
説明

With MuleSoft, you use the SAX parser to parse XML content and get an error like the below in the mule_ee log file:

[Fatal Error] :1:2: Content is not allowed in prolog.
解決策

The Mule SAX parser error that "Content is not allowed in the prolog" happens when trying to parse XML content that is not valid XML and normally refers to a different encoding or BOM before the XML declaration or invalid text such as:

1. The different encoding causes the error, and it occurs because the file encoding format is not correct.
2. Many text editors auto-add BOM to the UTF-8 file.
3. At the beginning of the XML declaration, any text will cause the "Content is not allowed in prolog" error
 

SOLUTION

1. You might add a JVM system property file.encoding=UTF-8 to ensure that UTF-8 is the encoding format or whatever you need. You can specify -Dfile.encoding=UTF-8 when invoking the application
2. Remove the BOM from the UTF-8 file
3. Delete any text before the XML declaration

ナレッジ記事番号

001121683

 
読み込み中
Salesforce Help | Article