未正确定义BASEDIR环境变量

Ash*_*rma 39 linux tomcat

在运行我的tomcat时,会出现以下错误.

未正确定义BASEDIR环境变量
运行此程序需要此环境变量

2009年12月23日下午1:03:22 org.apache.jk.server.JkMain启动INFO:Jk运行ID = 0时间= 1/41 config = null

这就是我在我的bashrc文件中设置JAVA_PATH的方法

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'
Run Code Online (Sandbox Code Playgroud)

Nin*_*Boy 113

我有同样的问题,这对我有用.

试试这个:

转到终端中的路径到tomcat/bin

然后执行以下命令:

chmod +x *.sh
Run Code Online (Sandbox Code Playgroud)

然后运行tomcat ./startup.sh


Deb*_*sis 9

对我来说问题出现是因为我安装了不同版本的apache tomcat.特别是,如果您尝试调用较新版本的Web服务器,并且CATALINE_HOME指向较旧版本,则会出现此错误.对我有用的快速修复是将CATALINA_HOME环境变量设置为您尝试调用的版本.