Unable to edit Build Plan or View Mail Server due to Corrupt Bamboo Mail Configuration

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When editing a build plan or viewing a configured mail server, Bamboo loads an empty page and the following error(s) are logged:

2010-06-10 11:02:15,836 ERROR [660420915@qtp-124427164-3] [runtime] Expression mailServerConfigured is undefined on line 295, column 44 in lib/build.ftl.

Expression mailServerConfigured is undefined on line 295, column 44 in lib/build.ftl.
The problematic instruction:
----------
==> ${mailServerConfigured?string} [on line 295, column 42 in lib/build.ftl]
 in user-directive bd.notificationWarnings [on line 18, column 5 in build/edit/editBuildNotification.ftl]
 in user-directive ww.form [on line 4, column 1 in build/edit/editBuildNotification.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression mailServerConfigured is undefined on line 295, column 44 in lib/build.ftl.
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
	at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
	at freemarker.core.BuiltIn$stringBI._getAsTemplateModel(BuiltIn.java:362)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.Expression.getStringValue(Expression.java:93)

And:

2010-06-10 11:02:15,899 ERROR [660420915@qtp-124427164-3] [CompoundRootAccessor] Caught an Ognl exception while getting property mailServerConfigured
ognl.OgnlException: mailServerConfigured [java.lang.RuntimeException: Error in mail config: Error in mail config: Premature end of file.]
	at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1299)
	at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60)
        .....
        .....
Caused by: org.xml.sax.SAXParseException: Premature end of file.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1765)
	at com.atlassian.mail.server.managers.XMLMailServerManager.configure(XMLMailServerManager.java:65)
	... 276 more
/-- Encapsulated exception ------------\
java.lang.RuntimeException: Error in mail config: Error in mail config: Premature end of file.
	at com.atlassian.mail.config.ConfigLoader.<init>(ConfigLoader.java:61)

Cause

Bamboo persists mail server configuration in bamboo-mail.cfg.xml file, located in <BAMBOO_HOME> directory.

The file has become corrupt, and the error happens when you attempt to add/edit a plans build notifications or view the mail server configuration.

Resolution

Reconfiguring your Bamboo mail server will fix the problem. To do this:

  1. Shutdown Bamboo;
  2. Delete the <BAMBOO_HOME>/bamboo-mail.cfg.xml file;
  3. Restart Bamboo and reconfigure your mail server.

 

Last modified on Jul 2, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.