JS Syntax and Reference errors after Confluence upgrade to 5.0.2

Nicholas Sideras March 10, 2013

I upgraded from 4.3 to 5.02 this morning, and in the process it looks like some javascript broke. When I load Confluence, it looks like CSS isn't loading, and I see the following line on top of the page in my browser

$soyTemplateRendererHelper.getRenderedTemplateHtml("com.atlassian.auiplugin:aui-experimental-soy-templates", "aui.page.header.soy", $templateParameters)

Additionally, I see the following errors in my browser

Uncaught SyntaxError: Unexpected identifier batch.js:1871
Uncaught ReferenceError: AJS is not defined confluence.web.resources:login.js:1
Uncaught ReferenceError: placeFocus is not defined login.action:88

I've tried restarting the server and re-running the upgrade, but neither helped.

Here's my stderr log:

2013-03-11 11:45:02 Commons Daemon procrun stderr initialized
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Mar 11, 2013 11:45:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Mar 11, 2013 11:45:03 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 966 ms
Mar 11, 2013 11:45:03 AM org.apache.catalina.core.StandardService start
INFO: Starting service Tomcat-Standalone
Mar 11, 2013 11:45:03 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Mar 11, 2013 11:45:54 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Mar 11, 2013 11:45:54 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Mar 11, 2013 11:45:54 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 50976 ms

And my stdout log:

2013-03-11 11:45:02 Commons Daemon procrun stdout initialized
2013-03-11 11:45:05,510 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 5.0.2 [build 4108 based on commit hash b47156ace146e4f759b49ef98258cb637bdd5af8]
2013-03-11 11:45:08,646 WARN [main] [atlassian.config.xml.AbstractDom4jXmlConfigurationPersister] saveDocumentAtomically Unable to move C:\Program Files\Atlassian\Application Data\Confluence\confluence.cfg.xml7274199780793782864tmp to C:\Program Files\Atlassian\Application Data\Confluence\confluence.cfg.xml. Falling back to non-atomic overwrite.

Obviously there's a few warnings in there, but from what I could tell in my searching, they probably don't mean much. Feel free to correct me if I'm wrong!

6 answers

1 accepted

1 vote
Answer accepted
Nicholas Sideras March 12, 2013

After contacting support, I found out that this can happen when the upgrade tasks don't run. I reverted to my database and home directory backups and re-ran the upgrade, and now everything is working correctly.

I suspect this happened because I stopped the server to re-enable SSL in the server config files, but I must have stoppped it too soon. During the second upgrade I made to sure to let the installer open Confluence in a local browser, and then I waited for that page to fully load. Once I new the upgrade was working, then I stopped the server to make my changes.

1 vote
Ruchi Tandon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 16, 2013

I just figured out that the problem could also be caused due to the fact that not all modules of the Soy plugin are enabled. Please refer to this KB article : Comment Box Disappears: $soyTemplateRendererHelper.getRenderedTemplateHtml and verify that all modules are enabled and then restart the instance. Hopefully that should resolve the problem.

0 votes
Martin Savard August 23, 2014

Do you mean computer/server restart or the confluence tomcat restart ?

luki puki August 24, 2014

to be honest, i already forgot. i'm running confluence within a virtual machine in my desktop, so either it was tomcat, or virtual server, or at last, the desktop pc restart.

0 votes
luki puki March 17, 2014

i have the same exact problem, except i did a fresh installation, not an upgrade.

i ran confluence via the *.bin installation file in a fresh virtualized virtualbox ubuntu 12.04LTS 64bit OS.

after installation i restarted the whole server, the license key page appeard and i continued with the setup installation. later on, right after the key page (took a lot of time to load the second page while some java process eat 100% cpu, but it loaded and i did not kill anything), the folowing pages remain broken, like there was none css (in fact css files loaded OK but some javascript is broken).

how should i proceed? try to install it all over again?

luki puki March 17, 2014

problem solved after system restart

0 votes
stuartu March 12, 2013

I upgraded a test Confluence 4.3.7 system this morning to 5.0.2, and on browsing the URL for the first time, I also had a similar error message, along with the main page looking rather wonky.

"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"

It came right after I bounced Confluence. I presume yours did too?

Nicholas Sideras March 12, 2013

Stuartu,

Check out the answer I left. You may have restarted the server before the upgrade tasks completed.

0 votes
Nicholas Sideras March 10, 2013

I had to look up the URL for the admin/viewplugins.action page since the admin page seems to be missing a link to it, but it looks like the bulk of the plugins are disabled. It could be that the Plugin Manager is just showing more stuff since the formatting is missing, so I'm not sure if this is relevant or not.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events