Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Spring Application context has not been set

Christian Eder December 24, 2014

I'm trying to install Confluence on a Mac OS Server. Other answers in this forum state that insufficient permissions of the data folder cause this problem, however both the installation and the data folder are writable (right click > get info > sharing & permissions > everything is "read & write" here). 

Am I mistaking the reason for this error (see full description below), or did I just mess up the permissions somehow? 

 

HTTP Status 500 - java.lang.IllegalStateException: Spring Application context has not been set
 
Type Exception report
message java.lang.IllegalStateException: Spring Application context has not been set
description The server encountered an internal error that prevented it from fulfilling this request.
exception
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set
	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
	com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:23)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:68)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:44)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:73)
	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:53)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:32)
	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)
	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:71)
	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

root cause
java.lang.IllegalStateException: Spring Application context has not been set
	com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)
	com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)
	com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:46)
	com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)
	com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
	com.atlassian.confluence.plugin.servlet.filter.ServletFilterModuleContainerFilter.getServletModuleManager(ServletFilterModuleContainerFilter.java:23)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:68)
	com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
	com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.web.filter.TranslationModeFilter.doFilter(TranslationModeFilter.java:44)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:73)
	com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:53)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:32)
	com.atlassian.confluence.web.filter.ResponseOutputStreamFilter.doFilter(ResponseOutputStreamFilter.java:25)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)
	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:71)
	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)
	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.52 logs.

17 answers

3 votes
William Zanchet [Atlassian]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 24, 2014

Hey Chris,

May I ask you, how did you install Confluence? Did you make sure that it was the administrator that run the installer? This error is pretty likely to be a permission issue. Make sure you apply the same privileges to the sub-folders as well of your home-directory and install-folder.

As a side note Mac OS isn't a supported platform for Confluence as you can see here: https://confluence.atlassian.com/display/DOC/Supported+Platforms

Cheers,
WZ

Christian Eder December 24, 2014

Thanks William for your help. Looks like I lack knowledge here: I installed it with my user, but believe it is an admin. Do you mean I should have installed it with the root user? As all the subfolders of the mentioned directories have the maximum privileges I assume my mistake is related to that admin-thing. Jep thanks for pointing that out. I installed Jira on a Mac Server too - worked without any troubles. Now that it's not best practice though.

Christian Eder December 25, 2014

I just realized: I didn't use the installer but installed from the .zip file due to the unsupported Mac Server. Don't know if that makes any difference now though.

Alex George December 22, 2015

This was my issue and installing as admin fixed it - thanks William!

Like Eugene Victorov likes this
1 vote
Michelle Roshto January 27, 2015

I had the same problem, it was looking for the odjc driver once that was added back into the folder...everything worked as it should. Hope that helps,

 

Michelle

Scott Beeson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 3, 2015

Man, you got my hopes up! The file was missing from the lib folder but sadly replacing it didn't fix the error :(

1 vote
Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2014

Hey Christian,

Installing with the root user is not recommended, but if the user you've created to run Confluence somehow lack of permissions, trying to install as a root might be a good shot to try.

May I ask which database are you trying to use?

Finally, may I also ask whether you're correctly setting the home directory to this application?

 

Please, check this documentation and make sure you're following every step to get it manually installed.

 

Best regards,

Eduardo Mallmann

0 votes
Smita Kelkar July 31, 2018

Thanks Nic. That's quite overwhelming but.

I got it through

I got it fine finally Confluence 6.10.0 on Windows 7. Below things helped

1. Used Internet Explorer to run setup instead of Chrome - Atlassian may want to note this and do compatibility testing

2. Used MySQL java connector 5.1.44 instead latest

3. Created another user in MySQL than root and provided it schema access for confluence before starting

4. Used JNDI spec while connecting to DB and session level 'READ-COMMITTED'

While doing these any change at any side ( MySQL/ Confluence ) , restarted respective and then continued

0 votes
Smita Kelkar July 30, 2018

I am facing same issue on Windows , I am running install using an admin user and permission is not a case here. Can someone help?  I saw a link with solutions but this is kind of trying to find a bird in the sky...everything possible is mentioned in it.. can someone help with practical experience

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2018

You need to work through all those possible reasons.  There's no way we can tell you which one it is, even if you had given us a log.

0 votes
Deleted user February 15, 2017

It's linux you can download from https://github.com/javamelody/javamelody/releases

 

0 votes
Adejumo Magbagbeola February 15, 2017

Where is  this file located  ? 

0 votes
Adejumo Magbagbeola February 15, 2017

Copy jira-javamelody-1.55.0.ja    from where     ?       Are we talking Windows or Linux? 

0 votes
Deleted user February 15, 2017

Copy jira-javamelody-1.55.0.jar to /opt/confluence/confluence/WEB-INF/lib

And restart confluence the problems was fixed

0 votes

I had the same issue. My solution is:

  • check all folders permission and make the same. 
  • Allow confluence os user to access both installation and home folder (complete path)
  • Allow confluence os user to access partial path. I mean: complete path is: /opt/atlassian/confluence..... Well os user have to access to: /opt - /opt/Atlassian - /opt/atlassian/confluence

After a lot of chmod 755 XXXX command, setup works.

 

Hope this help all

FABIO

0 votes
jermon February 7, 2015

Turned out In my case all confluence directories under both /var and /opt needed to be removed.  The uninstall does not appear to remove pertinent files under /var/ and this error will persist until they're removed.  I tried all other remedies, but a previous partially install must of somehow corrupted those files under /var. Thanks to 

Mark Sanderson

Christian Eder February 8, 2015

Thanks Jermon for your hint. Where do I find /var and /opt?

Christian Eder February 8, 2015

For future reference: /var is directly on the hard disc, it can be found by typing ls -l /var in the console. There is no /opt on my computer, according to this post on Stackexchange that's normal: http://apple.stackexchange.com/questions/119230/what-is-standard-for-os-x-filesystem-e-g-opt-vs-usr. Turned out that usr/local doesn't contain any confluence folder either, so I assume your solution doesn't solve my problem :(.

jermon February 8, 2015

Hello I am working from the CLI as root user My steps were 1. Uninstall Confluence by first command entry of "CD /" 2. Command entry of "ls" to list contents, which is where I find OPT directory 3. CD into /opt/atlassian/confluence and command entry of "./uninstall" 4. Command entry of "CD /opt/atlassian/" then command entry of "rm -rf confluence/" - to remove everything 5. Command entry of "CD /var/www/vhosts/XXXXXX (enter your doman here)" I locate the atlassian folder within there and command entry of "rm -rf confluence/" 6. I reinstall from Confluence binaries and it works Hope this helps - I'm on a linux server btw

Adejumo Magbagbeola February 14, 2017

Hi What will be the equivalent in windows  if you have  to remove /VAR and  /opt

 

Thanks

0 votes
Christian Eder January 27, 2015

Hi Michelle,

Thanks a lot for posting your solution, I really appreciate it. Could you tell me what exactly you did? I unfortunately have no clue what a odjc driver is, where I can get it from and to which folder I should add it.

Thank you!

0 votes
Christian Eder December 29, 2014

For whatever reason it appears that the uploading of the screenshots mentioned above didn't work. I'm trying again now, could somebody please check if those permission settings are right?

 

admin1.png

confluence-5_6_5_Info.png

data_Info_and_ched_—_bash_—_80×24.png

0 votes
Christian Eder December 29, 2014

Could it be that my JAVA_HOME is causing the trouble? It's apparently working with JIRA though:

Users/name/.bash_profile

export JAVA_HOME=`/library/java/JavaVirtualMachines/jdk1.7.0_71.jdk/contents/home/bin/java`

rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 29, 2014

Hi Christian, It may be something related to java as you mentioned. I have a look on my Mac OS and my JAVA configuration is like that: ecrmac-34:~ rrudnicki$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home ecrmac-34:~ rrudnicki$ ecrmac-34:~ rrudnicki$ ecrmac-34:~ rrudnicki$ java -version java version "1.7.0_25" Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode) ecrmac-34:~ rrudnicki$ ecrmac-34:~ rrudnicki$ ecrmac-34:~ rrudnicki$ cat .bash_profile |grep ^[^#] . "/Users/rrudnicki/.profile" export PATH="/opt/local/bin:/opt/local/sbin:$PATH” I could see your JAVA_HOME is pointing to /library/java/JavaVirtualMachines/jdk1.7.0_71.jdk/contents/home/bin/java while mine is pointing to /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home. The difference here is mine doesn't have the "/bin/java" and I believe this is causing the issue. So, could you please try set your JAVA_HOME like below and try to stop and start Confluence again? export JAVA_HOME='/library/java/JavaVirtualMachines/jdk1.7.0_71.jdk/contents/home/‘ Please let us know how it is going. Regards, Renato Rudnicki

Christian Eder December 29, 2014

It unfortunately didn't work :(. Neither did export JAVA_HOME=`/usr/libexec/java_home -v 1.7`.

Christian Eder January 1, 2015

Hopeless case ;(?

0 votes
Christian Eder December 27, 2014

Thanks again for your responses and efforts.

  • Tried is root user two days ago, same problem.
  • I believe my user has the full rights and the folders are both readable and writeable
  • I uploaded screenshots that show the rights of the users and the infos of the folders

These are my paths:

  • Installation: Users/name/Documents/Atlassian/confluence/confluence-5.6.5
  • Home: Users/name/Documents/Atlassian/confluence/data
  • (I had to move the folders in order to try to start them with the root user obviously)

confluenceinit.properties: 

  • confluence.home=/Users/ched/Documents/Atlassian/confluence/data
  • This is the the only line of code there (except for the comments)
0 votes
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2014

Hi Christian, 

Can you let us know with what user are you starting Confluence? 

Do not run Confluence as root, and ensure that the user running Confluence has full read and write access to the home folder. This can be set by running chmod -R with the appropriate permissions, to apply them recursively to each sub folder.

 

Also, can you check if do you have only one confluence.home variable configurede on confluenceinit.properties?

If do you have more than one, please remove that. 

 

Let us know if it works. 

 

Regards, 

Renato Rudnicki

0 votes
Christian Eder December 26, 2014

Thanks a lot Eduardo & William, 

I checked like a million times, but apparently I forgot to set a slash in front of the path in the confluence-init.properties. Thanks a lot for your help, I really appreciate it.

Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2014

That's awesome, Chris! Thanks for sharing your fix :) Happy holidays!

Christian Eder December 26, 2014

Oh no, that was too quick :(. I restarted the computer, started JIRA and then tried to start Confluence - same error again. I can't get Confluence running again, but it appears that it's related to JIRA - is that possible? Tried to restart the computer again and then start Confluence directly, without JIRA, but doesn't work, which is really weird. But I wish you happy holidays too ;).

Mallmann
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2014

Hey Chris, That's pretty weird, indeed. But I don't think it's related to JIRA, though. May I ask if you have had the chance to try to start Confluence as a root user already? Also, which directory are you setting as home directory for Confluence and JIRA? Can you let me know the full path for both? Best regards, Eduardo Mallmann

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events