Confluence don't start
Asked by karim DJAAFAR:

I try to start the confluence distribution (5.5.3) locally on my Mac OS 10.9 with the start-confluence.sh command but i get the following exception in my browser:

Etat HTTP 500 - Invocation of method 'getUserLocaleDefaultDatePattern' in class com.atlassian.confluence.setup.actions.SelectSetupStepAction threw exception java.lang.NullPointerException at /decorators/includes/header.vm\[line 51, column 47\] {#toc-hId-1847684421}
=========================================================================================================================================================================================================================================================================

*** ** * ** ***

**type** Rapport d''exception

**message** Invocation of method 'getUserLocaleDefaultDatePattern' in class com.atlassian.confluence.setup.actions.SelectSetupStepAction threw exception java.lang.NullPointerException at /decorators/includes/header.vm\[line 51, column 47\]

**description** Le serveur a rencontr? une erreur interne qui l''a emp?ch? de satisfaire la requ?te.

**exception**

**Here the content of my catalina.out log file:**

Caused by: javax.servlet.ServletException: 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 47, column 41\]  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$StreamingResponseWritingStrategy.renderToResponse(ConfluenceSitemeshDecorator.java:265)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecoratorUsingVelocity(ConfluenceSitemeshDecorator.java:207)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.applyDecorator(ConfluenceSitemeshDecorator.java:145)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.renderInternal(ConfluenceSitemeshDecorator.java:132)  
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator.render(ConfluenceSitemeshDecorator.java:111)  
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:33)  
... 44 more  
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 47, column 41\]

No port conflict appear and anyway i change the port ...

help is appreciated !

Karim


Answers:
author: Macsis
body: Hi all! Have a same problem, starting under root doesnt help :(

comments: author: Macsis
body: this is solution:
> Ok I've moved the entire home in my user's hierarchy, and modified /Users/myuser/confluence/confluence/WEB-INF/classes/confluence-init.propertiesand everything works fine now.

thanks to [**Nicolas Truchaud**](../../users/108316/nicolas-truchaud/)


author: ???
body: ???????


author: Bernhard Berger
body: Check you home directory entry in the file confluence-init.properties

.../.../.../confluence/WEB-INF/classes/confluence-init.properties


author: Septa Cahyadiputra
body: Hi there,

Just want to confirm, it is indeed not recommended to run Confluence as a root. Please refer to our KB here:

https://confluence.atlassian.com/display/CONFKB/Confluence+Does+Not+Start+Due+to+'Spring+Application+context+has+not+been+set'+in+Linux

Cheers,  
Septa Cahyadiputra


author: Karim DJAAFAR
body: Hi Matheus

Thank you for your help.

I switch to root user in my Mac OS, and relauch confluence (start-confluence.sh command) but nothing change the error is always the same in the catalina.out log file:

Grave: Exception Processing ErrorPage\[errorCode=500, location=/500page.jsp\]  
java.lang.RuntimeException: javax.servlet.ServletException: 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 47, column 41\]  
at com.opensymphony.sitemesh.webapp.deco

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 47, column 41\]  
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)

Many thanks for your help again !


author: Matheus Fernandes
body: Hi Karim,

Try starting it as a root - see [](https://jira.atlassian.com/browse/CONF-20393)<https://jira.atlassian.com/browse/CONF-20393>:)