本地Tomcat环境未启动
我正在尝试运行本地 Tomcat 环境,但始终遇到以下错误:
Can't load log handler "2localhost.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
我已确认 %TOMCAT_HOME%/bin 中存在“tomcat-juli.jar”。
拔掉这个的头发。它几乎消失了..非常感谢您提供的任何帮助。谢谢! :)
I'm attempting to get a local Tomcat environment running and am consistently encountering the following error:
Can't load log handler "2localhost.org.apache.juli.FileHandler"
java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
java.lang.ClassNotFoundException: 2localhost.org.apache.juli.FileHandler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
I've confirmed the existence of 'tomcat-juli.jar' in %TOMCAT_HOME%/bin.
Pulling hair out on this one. It's almost gone.. Any help you can offer is greatly appreciated. Thanks! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否修改了 catalina.policy 配置?
Did you modify your catalina.policy config?
JAR 放在 /bin 中有什么用处?如果您使用的是 Tomcat 5,则将其放在 server/lib 中;如果您使用的是 Tomcat 6,则将其放在 lib 中。这些目录位于 CLASSPATH 中; bin 不是。
更新:您正在使用 Tomcat 6,使用与以前版本不同的系统类加载器。这表明 juli JAR 属于 /bin,因此我之前的建议可能会纠正该问题,但这不是推荐的 Tomcat 6 习惯用法。
你设置了CATALINA_HOME吗?
What good does a JAR do in /bin? Put it in server/lib if you're using Tomcat 5 or lib if you're using Tomcat 6. Those directories are in the CLASSPATH; bin is not.
UPDATE: You're using Tomcat 6, which uses a system class loader that's different from previous versions. This suggests that the juli JAR belongs in /bin, so my previous suggestion might correct the problem but it's not the recommended Tomcat 6 idiom.
Do you have CATALINA_HOME set?