TIBCO Spotfire Server fails to start with error "The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it."

TIBCO Spotfire Server fails to start with error "The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it."

book

Article ID: KB0077169

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

When the TIBCO Spotfire co-branding package has been deployed on the TIBCO Spotfire Server, the server may fail to to start correctly and the following error will be seen in the catalina log file located in the  <installation dir>/tomcat/logs folder:
System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it.

 

Issue/Introduction

When TIBCO Spotfire co-branding package has been deployed, the TIBCO Spotfire Server may fail to start with the error "The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it" if the cobranding.config file has incorrect formatting.

Resolution

This can happen if there are any additional new lines inserted in the cobranding.config file before the actual <xml> declaration tag. The below line should be the very first line in the cobranding.config file followed by the rest of the xml tags:
<?xml version="1.0" encoding="utf-8"?>
Once the cobranding.config file has been corrected to ensure no new lines or white space before the <xml> declaration tag above, the co-branding package will need to be re-built and deployed again on the TIBCO Spotfire Server. After that corrected package has been deployed, the TIBCO Spotfire Server can be started.

Additional Information

Doc: The Cobranding.config Template