1

尝试使用多个实例完成 Filip Hanik “Large Scale Tomcat Deployments”中描述的内容。无法让我的 run.sh 工作,无论是在 Mac OSX 还是 Ubuntu 上。相同的错误:

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:218)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:407)

我的 run.sh 脚本:

#!/bin/bash

CONF="$1"
ACTION="$2"

if [ -z  "$1" -o -z "$2" ]; then
  echo "usage: run.sh <configuration> [start|stop]"
  exit -1
fi
export CATALINA_BASE="`pwd`/$CONF"     
export CATALINA_HOME="`pwd`/apache-tomcat-7.0.8" 
exec "$CATALINA_HOME/bin/catalina.sh" "$ACTION" 




Tomcat 7.0.8

/S
4

0 回答 0