Can't run Confluence due to com.atlassian.config.ConfigurationException: Failed to parse config file
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
After changes in Confluence's MySQL database URL, Confluence is not running and following appears in the catalina.out:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2015-03-24 07:45:29,857 ERROR [localhost-startStop-1] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] init Home is not configured properly:
com.atlassian.config.ConfigurationException: Failed to parse config file: Error on line 23 of document : The reference to entity "zeroDateTimeBehavior" must end with the ';' delimiter. Nested exception: The reference to entity "zeroDateTimeBehavior" must end with the ';' delimiter.
at com.atlassian.config.xml.DefaultDom4jXmlConfigurationPersister.load(DefaultDom4jXmlConfigurationPersister.java:35)
at com.atlassian.config.xml.DefaultDom4jXmlConfigurationPersister.load(DefaultDom4jXmlConfigurationPersister.java:65)
at com.atlassian.config.ApplicationConfig.load(ApplicationConfig.java:262)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:68)
at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:36)
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:129)
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:64)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.dom4j.DocumentException: Error on line 23 of document : The reference to entity "zeroDateTimeBehavior" must end with the ';' delimiter. Nested exception: The reference to entity "zeroDateTimeBehavior" must end with the ';' delimiter.
at org.dom4j.io.SAXReader.read(SAXReader.java:355)
at org.dom4j.io.SAXReader.read(SAXReader.java:261)
at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.loadDocument(AbstractDom4jXmlConfigurationPersister.java:68)
at com.atlassian.config.xml.DefaultDom4jXmlConfigurationPersister.load(DefaultDom4jXmlConfigurationPersister.java:31)
... 16 more
Cause
Confluence can't start due to the special character in the XML file (&). In above scenario, there is a delimiter ';' before zeroDateTimeBehavior
entity.
This has also been observed when special characters are present in the database password string: hibernate.connection.password
Resolution
Shut down Confluence.
Open
confluence.cfg.xml
in text editor.Shut down Confluence.
Edit
<confluence-home>/confluence.cfg.xml
file and change the"hibernate.connection.url"
and remove '&' from the URL:1
jdbc:mysql://localhost/confluencedb?autoReconnect=true&<EntityFromError>
ℹ️ Please replace
<EntityFromError>
to your entity.Start Confluence.
Try to generate backup.
Was this helpful?