TIBCO Spotfire Server fails to start with the error "The markup in the document following the root element must be well-formed"

TIBCO Spotfire Server fails to start with the error "The markup in the document following the root element must be well-formed"

book

Article ID: KB0078104

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

If the TIBCO Spotfire Server fails to start, you may see the following warning message in the server.log:
 WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start using conf/server.xml: The markup in the document following the root element must be well-formed

Issue/Introduction

This article explains the error "The markup in the document following the root element must be well-formed" seen when the TIBCO Spotfire Server fails to start

Resolution

This error indicates that the XML in the <Spotfire Server install dir>\tomcat\conf\server.xml file has invalid XML syntax. For example, this might be due to markup following the root element (In order to be well-formed, XML must have exactly one root element, and there can be no further markup following the single root element) or the root element of the file is missing or malformed, among other syntax errors. To resolve, open the server.xml file and verify that the XML is valid, specifically checking the following points below. 

1. Check if the root element of the XML file is missing or incorrect.
If the root element(<Server port="9005" shutdown="SHUTDOWN">) is missing in server.xml file, like:
User-added image
An XML validation would result in an error like this:
User-added image


2. Check if there are more than one root elements in the XML file.
In this example, there is additional root element ("Connector") incorrectly added in the server.xml file after the first root element ("Server") is closed, like:
User-added image

An XML validation would result in an error like this:
User-added image
User-added image

3. Check if there are any non-well formed elements in the XML file in general. To do this, you can use an XML validator. The server.xml must be valid XML for it to be properly read by the TIBCO Spotfire Server application. One example XML validation tool can be found here: https://www.xmlvalidation.com/
 

Additional Information

External: How to fix error: The markup in the document following the root element must be well-formed: External: XML Validator: