Friday, April 15, 2011

NoClassDefFoundError: org/apache/juli/logging/LogFactory

Today when I installed tomcat 7.0 and tried to start it from Eclipse, I see this familiar NoClassDefFoundError once discussed in one previous blog. The root cause is I somehow don't have the tomcat-juli.jar (which is for logging) in classpath, therefore the fix is:
  1. In Eclipse, open "Servers" tab and select the "Apache Tomcat v7.0 at localhost"
  2. Double click or select "Open" from right-click menu to open configuration 
  3. Select "open launch configuration"
  4. From the "Edit Configuration" dialog, select "Classpath" tab, then click "Add External JARs"
  5. Add TOMCAT_HOME/bin/tomcat-juli.jar to the classpath
  6. Start Tomcat v7.0
For juli details, refer to org.apache.juli package summary
For configuration details, refer to below screen snapshot


    No comments:

    Post a Comment