Crowd cannot be started: JAVA_HOME is not configured correctly

While trying to install Crowd on Windows according to this howto, I stumbled over the above error. Here's some console output:

C:\Atlassian\Crowd>set jav
JAVA_HOME=C:\Java\jdk6

C:\Atlassian\Crowd>start_crowd.bat
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
C:\Atlassian\Crowd>

As you can see, my JAVA_HOME environment variable is actually pointed to a JDK directory. Also, this very server is already running multiple Atlassian apps (Jira, Confluence, Fisheye,...) which all work. So Java *should* be configured correctly.

Any ideas what could cause this? Where can I look? What can I do?

2 answers

1 accepted

This widget could not be displayed.

Have you tried putting some debug into the batch files to see what is happening? start_crowd.bat just calls the catalina startup script so....

In start_crowd.bat put in

echo Using JAVA_HOME: "%JAVA_HOME%"

Then do the same in

C:\Atlassian\Crowd\apache-tomcat\bin\catalina.bat

It might give you an idea what's going on.

Just reading your error message it looks like it's finding Java somewhere (maybe system default JRE), do you get the same if you run it as an absolute path?

C:\Atlassian\Crowd\start_crowd.bat

and have you tried installing it as a service to see if it runs that way?

http://confluence.atlassian.com/display/CROWD/Installing+Crowd+as+a+Windows+Service

What version of crowd?

Neat idea. Both report the correct path.

C:\Atlassian\Crowd>start_crowd.bat
Using JAVA_HOME: "C:\Java\jdk6"
Using JAVA_HOME: "C:\Java\jdk6"
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

Hmmmm I might try reinstalling Java.

The current one, 2.3.2.

When running service.bat install Crowd, I get this error:
C:\Atlassian\Crowd\apache-tomcat\bin>service.bat install Crowd
The tomcat.exe was not found...
The CATALINA_HOME environment variable is not defined correctly.
This environment variable is needed to run this program

The Catalina_Home env-variable is indeed set to something fishy, a nonexisting directory. However, I didn't set that variable myself.

C:\Atlassian\Crowd\apache-tomcat\bin>set cat
CATALINA_HOME=C:\Atlassian\Crowd\apache-tomcat\bin\apache-tomcat

The fix is actually to set the CATALINE_HOME env-variable to the correct value myself, in my case C:\Atlassian\Crowd\apache-tomcat.

Thanks for helping me figure that out.

Apparently, CATALINA_HOME is set in start_crowd.bat, and it's set incorrectly in my opinion. I'll check, thanks very much.

Cool, glad I could help. One more thing, if something had set CATALINA_HOME then it might be something needs it, worth checking the other servers stop/start correctly at some point

This widget could not be displayed.

I had this problem as well. Turned out I had both a JRE and a JDK installed. Even though my environment variable was set correctly and other Atlassian Apps worked fine, before the JDK, it still somehow picked up my JRE, probably from a bath.

I uninstalled the JRE and everything worked out just fine. At least got me one step closer to my install completing. Still trying to work out my other issue trying to connect crowd to MS SQL 2008R2.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 10 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

39 views 0 5
Read article

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