Tomcat6 无法在 Windows 和 Java6 上启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1127550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tomcat6 won't start on Windows and Java6
提问by zorlack
I just downloaded a fresh copy of Tomcat6 to install on a development server. The server is running Win2k3 SP2 and Java6.
我刚刚下载了 Tomcat6 的新副本以安装在开发服务器上。服务器正在运行 Win2k3 SP2 和 Java6。
When I go to start Tomcat6 it reports the following:
当我启动 Tomcat6 时,它报告以下内容:
D:\>d:\tomcat\bin\tomcat6.exe //TS/Tomcat6 [2009-07-14 15:26:38] [427 prunsrv.c] [error] The operation completed successfully. [2009-07-14 15:26:38] [1336 prunsrv.c] [error] Load configuration failed
It seems like Tomcat is having config issues, but I'm not sure where to start looking. It's a bit surprising that Tomcat had this problem right out of the box. Is there any compatability problem between Java6 and Tomcat6? Why might the default config be failing?
Tomcat 似乎有配置问题,但我不确定从哪里开始寻找。Tomcat 开箱即用就遇到了这个问题,这有点令人惊讶。Java6 和 Tomcat6 之间是否存在兼容性问题?为什么默认配置可能会失败?
回答by Roman Kagan
Just curious if your CATALINA_HOME and JAVA_HOME set? Those environment variables are prerequisite to run Tomcat. Go to Start-->My Computer (right click on it) -->Properties-->Advanced-->Environment Variables (button) and then set CATALINA_HOME to the path of your Tomcat and JAVA_HOME to the location of your JDK, also add JAVA_HOME\bin to your PATH variable.
只是好奇你的 CATALINA_HOME 和 JAVA_HOME 是否设置?这些环境变量是运行 Tomcat 的先决条件。转到开始-->我的电脑(右键单击它)-->属性-->高级-->环境变量(按钮),然后将CATALINA_HOME设置为Tomcat的路径,将JAVA_HOME设置为JDK的位置,也将 JAVA_HOME\bin 添加到您的 PATH 变量中。
回答by zorlack
Ok, Solved this one myself. It turns out that "Load configuration failed" was a red herring. This was caused by Tomcat being unable to load java. I discovered this in $CATALINA_HOME\logs\jakarta_service_YYYMMDD.log.
好的,我自己解决了这个问题。事实证明,“加载配置失败”是一个红鲱鱼。这是由于Tomcat无法加载java造成的。我在 $CATALINA_HOME\logs\jakarta_service_YYYMMDD.log 中发现了这个。
I solved the problem by following these instructions. Which basically amounts to copying msvcr71.dll to c:\windows\system32
我按照这些说明解决了这个问题。这基本上相当于将 msvcr71.dll 复制到 c:\windows\system32
回答by Thorbj?rn Ravn Andersen
What would the //TS/Tomcat6 argument do?
//TS/Tomcat6 参数会做什么?
The simplest way to make this work outside an IDE is to install it as a Windows Service and us the Monitor TOmcat application to stop and start it.
在 IDE 之外进行这项工作的最简单方法是将其安装为 Windows 服务,然后我们使用 Monitor TOmcat 应用程序来停止和启动它。