Nuxeo 6.0 does not start after applying latest hotfix -- FreeMarker exception

The message after sudo service nuxeo start:

 Expression nuxeo.server.declare_datasources is undefined on line 51, column 21 in server.xml.nxftl.
 The problematic instruction:
 ----------
 ==> if !isWizard && nuxeo.server.declare_datasources == "true" [on line 51, column 3 in server.xml.nxftl]
Java backtrace for programmers:
 ----------
 freemarker.core.InvalidReferenceException: Expression nuxeo.server.declare_datasources is undefined on line 51, column 21 in server.xml.nxftl.
    at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)

What do I need to do to troubleshoot/repair this problem?

0 votes

1 answers

2100 views

ANSWER



You must have a custom overloaded server.xml.nxftl. There is no nuxeo.server.declare_datasources anymore in Nuxeo 6.0, it's been changed (with opposite meaning) to nuxeo.db.embeddedDatasources in NXP-14728.

Take the server.xml.nxftl from the standard distribution (templates/common-base/conf/server.xml.nxftl) and re-apply your custom changes to it.

1 votes



Thank you, this is exactly what was wrong. Of course there is a secondary error after this is cleared.

 2015-05-18 17:47:02,470 ERROR [localhost-startStop-1] [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nuxeo]] Exception sending context initialized event to listener instance of class org.nuxeo.runtime.deployment.NuxeoStarter
 java.lang.ExceptionInInitializerError
 ...
 Caused by: java.lang.IllegalStateException: Runtime not initialized
         at org.nuxeo.runtime.api.Framework.checkRuntimeInitialized(Framework.java:531)

I don't see anything else of interest in any of the logs.

05/18/2015

Seems as though my local configuration also has a web.xml.nxftl in its conf/ folder – perhaps this is a similar issue? (We used it to conditionally deploy a servlet filter for request logging)
05/18/2015

I left out the bottom of the stack trace that was checking for the runtime's initialization status:

         at org.nuxeo.ecm.webengine.gwt.GwtBundleActivator.<clinit>(GwtBundleActivator.java:46)
05/18/2015

You should carefully review the changes you made in your customized templates. Start with the standard Nuxeo ones and add your customizations one by one to see which one breaks.
05/25/2015