Tomcat为tomcat 7的多个实例实现run.sh
尝试使用多个实例来完成 Filip Hanik“大规模 Tomcat 部署”中描述的内容。无法让我的 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
Trying to accomplish what's described in Filip Hanik "Large Scale Tomcat Deployments", with multiple instances. Can't get my run.sh to work, neither on Mac OSX nor Ubuntu. Same fault:
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)
My run.sh script:
#!/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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论