Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The BASEDIR environment variable is not defined correctly

Tags:

linux

tomcat

While running my tomcat the following error is coming .

The BASEDIR environment variable is not defined correctly
This environment variable is needed to run this program

Dec 23, 2009 1:03:22 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=1/41 config=null

This is how I set my JAVA_PATH in my bashrc file

export JAVA6_HOME=/home/asharma/Softwares/jdk1.6.0_12 export JAVA_HOME=$JAVA6_HOME  export JPDA_TRANSPORT=dt_socket export JPDA_ADDRESS=9000 export RESIN_HOME=/home/asharma/Softwares/resin  export PATH JAVA_HOME     export GDK_NATIVE_WINDOWS=1  export CATALINA_HOME=/home/asharma/Softwares/apache-tomcat-6.0.20         export CATALINA_OPTS="-Dcom.sun.management.jmxremote Dcom.sun.management.jmxremote.port=19000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"  export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"  alias tstart="$CATALINA_HOME/bin/catalina.sh jpda start -Xmx2000m -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false ; tail -f $CATALINA_HOME/logs/catalina.out" alias tstop="sh $CATALINA_HOME/bin/shutdown.sh"  alias minstall='mvn clean install -Dhttps.proxyHost=monitoring01.hyd.int.untd.com -Dhttps.proxyPort=3128'  alias resin='sh $RESIN_HOME/bin/httpd.sh -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=12345 -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -verbose -DVPS_HOME=/home/asharma/vps -Xms2000m -Xmx2000m' 
like image 408
Ashish Sharma Avatar asked May 25 '11 13:05

Ashish Sharma


2 Answers

I had the same problem and this worked for me.

Try this:

Go to the your path-to-tomcat/bin in the terminal

Then execute the command below:

chmod +x *.sh 

Then run tomcat using ./startup.sh

like image 50
NinjaBoy Avatar answered Oct 04 '22 03:10

NinjaBoy


For me the problem occurs because I have different versions of apache tomcat installed. In particular, you get this error if you are trying to invoke a newer version of the web-server, with the CATALINE_HOME pointed to an older version. A quick fix, which worked for me, is to set the CATALINA_HOME environment variable to the version you are trying to invoke.

like image 39
Debasis Avatar answered Oct 04 '22 04:10

Debasis