Unable to compile Soy template in plugin module

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

When you access Confluence dashboard, it may not render properly the menus, look fuzzy and you will see the following error instead of the dashboard (It can appear in logs as well):

Error formatting macro: recently-updated-dashboard: com.atlassian.confluence.renderer.template.TemplateRenderingException: Unable to compile Soy template in plugin module: confluence.macros.dashboard:dashboard-macros-resources

Symptoms

The following appears in the atlassian-confluence.log:

WARN [http-8090-8] [confluence.plugins.soy.VelocityFriendlySoyTemplateRenderer] getRenderedTemplateHtml Error while rendering the template com.atlassian.auiplugin:aui-experimental-soy-templates:aui.page.header.soy
com.atlassian.confluence.renderer.template.TemplateRenderingException: Unable to compile Soy template in plugin module: com.atlassian.auiplugin:aui-experimental-soy-templates
	at com.atlassian.confluence.plugins.soy.ConfluenceSoyTemplateRenderer.renderTo(ConfluenceSoyTemplateRenderer.java:35)
	at com.atlassian.confluence.renderer.template.DelegatingTemplateRenderer.renderTo(DelegatingTemplateRenderer.java:37)
...
Caused by: com.atlassian.soy.renderer.SoyException: Unable to compile Soy template in plugin module: com.atlassian.auiplugin:aui-experimental-soy-templates
	at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:160)
	at com.atlassian.soy.impl.SoyTemplateRendererImpl.render(SoyTemplateRendererImpl.java:40)
	at com.atlassian.soy.impl.SoyTemplateRendererImpl.render(SoyTemplateRendererImpl.java:33)
	... 100 more
Caused by: com.atlassian.soy.renderer.SoyException: Error while extracting module data for '[com.atlassian.auiplugin:aui-experimental-soy-templates]'
	at com.atlassian.soy.impl.ModuleDataFactory.get(ModuleDataFactory.java:78)
	at com.atlassian.soy.impl.DefaultSoyManager.makeBuilder(DefaultSoyManager.java:252)
	at com.atlassian.soy.impl.DefaultSoyManager.strainTofu(DefaultSoyManager.java:244)
	at com.atlassian.soy.impl.DefaultSoyManager.access$400(DefaultSoyManager.java:49)
	at com.atlassian.soy.impl.DefaultSoyManager$1.apply(DefaultSoyManager.java:100)
	at com.atlassian.soy.impl.DefaultSoyManager$1.apply(DefaultSoyManager.java:94)
	... 123 more
Caused by: java.lang.IllegalStateException: Required plugin module com.atlassian.auiplugin:aui-experimental-soy-templates was either missing or disabled
	at com.atlassian.soy.impl.ModuleDataFactory$ModuleDataBuilder.addTemplatesAndFunctionsForTree(ModuleDataFactory.java:117)
	at com.atlassian.soy.impl.ModuleDataFactory$ModuleDataBuilder.access$200(ModuleDataFactory.java:102)
	at com.atlassian.soy.impl.ModuleDataFactory.extractModuleData(ModuleDataFactory.java:95)
	at com.atlassian.soy.impl.ModuleDataFactory.access$000(ModuleDataFactory.java:30)
	at com.atlassian.soy.impl.ModuleDataFactory$1.apply(ModuleDataFactory.java:52)
	at com.atlassian.soy.impl.ModuleDataFactory$1.apply(ModuleDataFactory.java:48)
	... 134 more

Check if the log files are indicating that Plugins are Disabled at Startup due to a timeout:

WARN [Timer-4] [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] timeout Timeout occurred before finding service dependencies for [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.aui.plugin-integration-sal, config=osgibundle:/META-INF/spring/*.xml)]

Cause

Confluence bundled plugin Shared Access Layer (SAL) is not being enabled due to a timeout in the startup. This plugin is required to render Confluence pages.

Resolution

  1. Shutdown Confluence
  2. In the installation folder of your Confluence edit either bin/setenv.bat or bin/setenv.sh file in a text editor.
  3. Add the JVM parameter

    setenv.sh
    CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"

     See Configuring System Properties for tips on how to set an environment variable.

  4. And then, clean the plugins cache by removing the directories below:
     This will remove the plugin cache files only. It will not permanently remove any plugins. These directories will be recreated during the next Confluence startup

    <confluence-home>/bundled-plugins
    <confluence-home>/plugins-cache
    <confluence-home>/plugins-osgi-cache
    <confluence-home>/plugins-temp
    <confluence-home>/bundled-plugins_language
  5. Start Confluence

Last modified on Nov 2, 2018

Was this helpful?

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