It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

java.lang.IllegalStateException: Spring Application context has not been set

I have spent the last 8 hours trying to install Confluence on our servers. I faced dozens of errors, but I have managed to work through many of them. But now I am stuck, over and over again, with the same error.

Here is what I do:

I go to the console of AWS.

I create a new EC2 instance. I've been using a t2.medium, which has 2 CPUs and 4 gigs of RAM. We are a small startup, so for the next few months there will only be a dozen people using this instance. I don't think we need a very powerful machine? The whole machine will be dedicated to running Confluence.

I ssh to the server. I install:

postgresql 9.6

nginx

I configure a reverse-proxy so port 8090 can be served as if root on port 80.

I then edit :

/etc/hosts

so that it reads:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 avconfluence


::1         localhost6 localhost6.localdomain6 avconfluence

I test this:

ping avconfluence

I see:

127.0.0.1

Then I upload:

atlassian-confluence-6.8.2-x64.bin

I chmod this so it is executable.

As root, I execute it.

Then I point my browser at the IP address for this EC2 instance. I get a setup screen that asks for a license key. I go and get a license key for a trial. The page that offers license keys asks me "Please confirm that you want this license key for the server "localhost".

The first time I did this I clicked "yes" and it tried to redirect to "localhost".

So now I click "no" and I copy the license key manually.

I click submit on that form.

The browser pauses while work is done in the background, and finally it redirects to an error page:

No WebApplicationContext found: no ContextLoaderListener registered?

One possible error that I've made is that I'm running Confluence as the root user. I now find out that I should run this as the user "confluence". I try:

su confluence

/opt/atlassian/confluence/bin/start-confluence.sh -fg

This starts. I hit "refresh" in my browser. I am at this URL:

http://35.73.13.39/setup/setupembeddeddb-default.action

I get this error:

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set
	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
	at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
	

At this point I've tried installing Confluence many dozens of times, and all I've ever gotten is errors. Is there any place that actually explains, step by step, in detail, what I really need to do to get this thing to work?

Each time I retry, I start over again, setting up a new EC2 instance. This doesn't seem to help.

 

 

 

2 comments

I eventually learned that it was possible to restart the setup process by deleting the file confluence.cfg.xml so I did this:

/etc/init.d/confluence  stop

rm /var/atlassian/application-data/confluence/confluence.cfg.xml

/etc/init.d/confluence  start

but now I'm trying to finish the setup, and all I get is a blank page:

Like nalog_nl likes this

I am trying to show the image, but every time I post the link, this forum gives me an error saying that my HTML is poorly formatted. But I am not trying to use HTML, I am trying to use plain text.

I am going to try to trick the forum software by putting meaningless text in front of the "http":

 

Okay, that worked. As you can see, I get a blank page.

So what should I do to fix this?

Okay, I got this fixed. I set up a normal DNS subdomain, and then went through this again:

/etc/init.d/confluence  stop

rm /var/atlassian/application-data/confluence/confluence.cfg.xml

/etc/init.d/confluence  start

and started over, and that got past me by the errors.

Like nalog_nl likes this

Comment

Log in or Sign up to comment
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

328 views 9 7
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you