2

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

mO_odRing
  • 1,935
  • 3
  • 15
  • 19

2 Answers2

1

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?

duffymo
  • 305,152
  • 44
  • 369
  • 561
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";
};
Droo
  • 3,177
  • 4
  • 22
  • 26