3

Deployer service starts but quickly stops.

On checking the microservice logs in C:\SDL\Web\log\, we found an exception in C:\SDL\Web\log\deployer-combined\cd_core

Caused by: com.tridion.configuration.ConfigurationException: org.xml.sax.SAXParseException; systemId: file:///C:/SDL/Web/deployer-combined/deployer-conf.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at com.tridion.configuration.XMLConfigurationReader.readConfiguration( XMLConfigurationReader.java:128) at com.sdl.delivery.deployer.configuration.DeployerConfigurationLoader.configure( DeployerConfigurationLoader.java:134)

1 Answer 1

4

Tridion XML configuration files are often manually edited. If you do this, you must always use a TEXT Only editor otherwise your file may get saved with a BOM.

https://en.wikipedia.org/wiki/Byte_order_mark

The Byte Order Mark (BOM) is not handled by Java Xerces XML Parser.

So you get a Configuration Exception “Content is not allowed in prolog

I recommend that you always script changes to the Tridion configuration files or always use a text only editor.

PowerShell example to save configuration files without a Byte Order Mark.

#
# RemoveBOM.ps1
#

# Byte Order Mark is not handled by Java Xerces XML Parser

# Typical Exception:
# Caused by: com.tridion.configuration.ConfigurationException:
# org.xml.sax.SAXParseException; 
# systemId: file:///C:/SDL/Web/deployer-combined/deployer-conf.xml; 
# lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

    $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False)   
    $filepath = "C:\sdl\web\deployer-combined\config\deployer-conf.xml"
    $content = Get-Content -Path $filepath
    [System.IO.File]::WriteAllLines($filepath , $content, $Utf8NoBomEncoding)

Also read Dominic's excellent Blog on the BOM
http://dominic.cronin.nl/weblog/deployer-conf-xml-barfs-on-the-bom

2
  • Hahaha - Chris - you really should try to keep up with my blog: dominic.cronin.nl/weblog/deployer-conf-xml-barfs-on-the-bom ;-) Oct 25, 2017 at 15:22
  • 1
    @ Dominic Nice article Dominic. I agree with your comments and I script absolutely everything I can and use PowerShell xml objects to slap the config files into shape. I don't have time to blog so I am putting the fixes I find into Tridion Stack exchange as I go. Oct 25, 2017 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.