title: Error in Eclipse-Tomcat Setup - ClassNotFoundException "1catalina.org.apache.juli.FileHandler"
body: <p><strong>Setup:</strong> Eclipse Juno R, Tomcat 7.0.8, tomcat run through eclipse plug in.
  Tomcat launch configuration from eclipse has VM argument 
  -Djava.util.logging.config.file="C:\WS\Serverlogs\tomcat7\conf\logging.properties"
   (Ref: <a href="https://stackoverflow.com/questions/2233053/where-can-i-view-tomcat-log-files-in-eclipse">Where can I view Tomcat log files in Eclipse?</a>)
  Getting following error.</p>
  
  <pre><code>Can't load log handler "1catalina.org.apache.juli.FileHandler"
  java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
  java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
      at java.net.URLClassLoader$1.run(Unknown Source)
      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)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.util.logging.LogManager$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.util.logging.LogManager.loadLoggerHandlers(Unknown Source)
      at java.util.logging.LogManager.addLogger(Unknown Source)
      at java.util.logging.LogManager$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.util.logging.LogManager.&lt;clinit&gt;(Unknown Source)
      at java.util.logging.Logger.getLogger(Unknown Source)
      at org.apache.juli.logging.DirectJDKLog.&lt;init&gt;(DirectJDKLog.java:71)
      at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:196)
      at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:170)
      at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:242)
      at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:293)
      at org.apache.catalina.startup.Bootstrap.&lt;clinit&gt;(Bootstrap.java:57)
  Can't load log handler "1catalina.org.apache.juli.FileHandler"
  </code></pre>
  
  <p>There are similar errors for "1catalina.org.apache.juli.FileHandler","2localhost.org.apache.juli.FileHandler" and others.
  I understand that these classes come from tomcat-juli.jar at /bin.
  I added this jar into server classpath (Eclipse -> Servers -> Open -> Open Lauch configuration -> Classpath -> User Entries), but got the same error.
  Contents of logging.properties are:</p>
  
  <pre><code>handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
  
  .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
  
  1catalina.org.apache.juli.FileHandler.level = FINE
  1catalina.org.apache.juli.FileHandler.directory = C:\WS\Serverlogs\tomcat7/logs
  1catalina.org.apache.juli.FileHandler.prefix = catalina.
  
  2localhost.org.apache.juli.FileHandler.level = FINE
  2localhost.org.apache.juli.FileHandler.directory = C:\WS\Serverlogs\tomcat7/logs
  2localhost.org.apache.juli.FileHandler.prefix = localhost.
  
  3manager.org.apache.juli.FileHandler.level = FINE
  3manager.org.apache.juli.FileHandler.directory = C:\WS\Serverlogs\tomcat7/logs
  3manager.org.apache.juli.FileHandler.prefix = manager.
  
  4host-manager.org.apache.juli.FileHandler.level = FINE
  4host-manager.org.apache.juli.FileHandler.directory = C:\WS\Serverlogs\tomcat7/logs
  4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
  
  java.util.logging.ConsoleHandler.level = FINE
  java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
  
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
  
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
  
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
  org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
  </code></pre>
  
  <p>Any input / guidance is most appreciated.
  Found these 
  <a href="https://stackoverflow.com/questions/136300/how-to-configure-tomcat-juli-logging-to-roll-log-files">How to configure Tomcat JULI logging to roll log files?</a>
  <a href="https://stackoverflow.com/questions/2166414/local-tomcat-environment-not-starting">Local Tomcat Environment Not Starting</a>
  , but my issue seems to be different.</p>
  
  <p><strong>Edit1</strong>
  Adding "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" to server's VM Argument and changing "\" to "/" in the logging.properties did the trick.
  Thanks to Robin for the pointer to Tomcat Logging FAQ</p>
  
  <p>Thank you,
  VJ</p>