Nginx Proxy and Spring Application context

I am having some issue configuring the Nginx Proxy to work with Confluence. I have Confluence configured and serving on localhost:8090 which I am using Nginx proxy configuration from the official documentation. I did not set a "/confluence" context path as I prefer to keep it at the root level. However, as soon as I started Nginx after Confluence is running, there are large amount of stack traces thrown with similar detail as below.

Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getLocale' in  class com.atlassian.confluence.core.ConfluenceActionSupport threw exception java.lang.IllegalStateException: Spring Application context has not been set at /decorators/includes/header.vm[line 58, column 41]
        at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
        at org.apache.velocity.context.ProxyVMContext.get(ProxyVMContext.java:222)
        at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:843)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:222)
        at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        at org.apache.velocity.runtime.parser.node.ASTStringLiteral.value(ASTStringLiteral.java:290)
        at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
        at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
        at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
        at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at com.atlassian.confluence.setup.velocity.TrimDirective.render(TrimDirective.java:33)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)
        at com.atlassian.confluence.setup.velocity.ProfilingParseDirective.render(ProfilingParseDirective.java:21)
        at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
        at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
        at org.apache.velocity.Template.merge(Template.java:328)
        at org.apache.velocity.Template.merge(Template.java:235)
        at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:68)
        at com.atlassian.confluence.util.velocity.VelocityUtils.renderTemplateWithoutSwallowingErrors(VelocityUtils.java:76)
        at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$StreamingResponseWritingStrategy.renderToResponse(ConfluenceSitemeshDecorator.java:291)
        ... 58 more

 

How can I make this work properly?

1 answer

This widget could not be displayed.
Ann Worley Atlassian Team Jun 27, 2017

The error you posted is almost identical to one of the ones listed on Confluence does not start due to Spring Application context has not been set. Please review the resolutions in the knowledge base article.

Are you reporting that you only see this error when the proxy is enabled? Does Confluence run as expected when you don't start NGINX? 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

477 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you