Local Tomcat Environment Not Starting

大兔子大兔子 提交于 2019-12-20 04:07:52

问题


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! :)


回答1:


Did you modify your catalina.policy config?

grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
        permission java.security.AllPermission;
        permission java.lang.RuntimePermission "setContextClassLoader";
};



回答2:


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?



来源:https://stackoverflow.com/questions/2166414/local-tomcat-environment-not-starting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!