Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Nginx Proxy and Spring Application context

Doc Magic June 16, 2017

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

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 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
TAGS
AUG Leaders

Atlassian Community Events