Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Server not starting

 
Arpan Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know many have posted this question but I am not getting much from already posted answer
I have been trying to solve this problem since few days to no success
The JAVA_HOME environment variable is not defined properly while starting startup.bat file in extracted apache tomcat 6 Folder

It shows following error

C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36\bin>startup
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
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your environment variables - it seems that either the JAVA_HOME variable is not set, or not set to point to the right directory.
 
Arpan Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are my environmental variables

JAVA_HOME in user variables: C:\Program Files (x86)\Java\jdk1.7.0_01;

JRE_HOME in user variables: C:\Program Files (x86)\Java\jre7;

PATH in user variables: C:\Program Files (x86)\Java\jdk1.7.0_01\bin;C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36\lib\servlet-api.jar;

CLASSPATH in System variable: C:\mysql-connector-java-5.1.23\mysql-connector-java-5.1.23\mysql-connector-java-5.1.23-bin.jar

The extracted apache folder is at following path

C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36\bin
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I notice that you have extraneous semi-colons in your JAVA_HOME and JRE_HOME variables.
 
Arpan Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's what I get after removing those extraneous semicolons. I did not get the previous error but server has not started

Using CATALINA_BASE: "C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36"

Using CATALINA_HOME: "C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36"

Using CATALINA_TMPDIR: "C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36\
temp"
Using JRE_HOME: "C:\Program Files (x86)\Java\jre7"
Using CLASSPATH: "C:\Users\HP\Downloads\apache-tomcat-6.0.36-windows-x64\apache-tomcat-6.0.36\
bin\bootstrap.jar"


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the log files; there's probably something in there.
 
Arpan Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
commons daemon file shows the following error

[2013-02-23 02:05:30] [info] Commons Daemon procrun (1.0.10.0 64-bit) started
[2013-02-23 02:05:30] [error] Unable to open the Service Manager
[2013-02-23 02:05:30] [error] Access is denied.
[2013-02-23 02:05:30] [error] Commons Daemon procrun failed with exit value: 8 (Failed to install service)
[2013-02-23 02:05:30] [error] Access is denied.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like a permissions problem that has little to do with Tomcat itself. Do you have admin rights on this machine?
 
Arpan Patil
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've solved this problem just now
I removed JRE_HOME
and now I've only JAVA_HOME as environment variable

But now I am getting different error in server's prompt as below (while running my application which uses MySql)

Java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
java.lang.NullPointerException
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the respective jar file is in WEB-INF/lib.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic