开发者

The BASEDIR environment variable is not defined correctly

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="$CATA开发者_开发技巧LINA_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'


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


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.


I had this issue in windows 7 with a new installation of tomcat, after about 30 minutes of looking i wanted to see where the error was and opened up the classpath.bat file to see a variable named BASEDIR. I tried all the different things people suggested to no avail. The simple solution i found..

open startup.bat add

set BASEDIR=d:\tomcat

or whatever your tomcat base folder is to the line right after @echo off (this is the first line in the file)


I solved it using sudo:

sudo ./startup.sh


I have same problem and have resolved it. There is another tomcat and have CATALINA_HOME setting in /etc/profile, when the new tomcat starts, the CATALINA_HOME redirect to old tomcat home, where the new tomcat starting user doesn't have permission to execute.

Just, add the setting "export CATALINA_HOME=" to the new tomcat home at the beginning of the startup.sh script.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜