Confluence don't start

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]


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

5 answers

Hi all! Have a same problem, starting under root doesnt help :(

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

这是怎么操作的

Check you home directory entry in the file confluence-init.properties

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

0 vote

Hi Karim,

Try starting it as a root - see https://jira.atlassian.com/browse/CONF-20393:)

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 !

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 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,785 views 25 10
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