Results 1 to 2 of 2

Thread: Eclipse + Tomcat5.5

  1. #1
    Join Date
    Jul 2007
    Beans
    25

    Eclipse + Tomcat5.5

    Eclipse + Tomca5.5 problem
    Hi there
    I'm following this tutorial: http://www.youtube.com/watch?v=JyK9KzkQnQo

    I'm getting an error when trying to start Tomcat :

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.catalina.startup.Bootstrap.<clinit> (Bootstrap.java:54)

    Tomcat starts fine if started from command line on the server: /etc/init.d/tomcat5 start which makes me think that this is en eclipse problem.

    I've found /usr/share/java/commons-logging.jar which contains:
    org/apache/commons/logging/LogFactory$1.class
    org/apache/commons/logging/LogFactory$2.class
    org/apache/commons/logging/LogFactory$3.class
    org/apache/commons/logging/LogFactory$4.class
    org/apache/commons/logging/LogFactory$5.class

    I've added this library to my project by going to libraries >> Apache
    Tomcatv5.5 >> Build Path >> Configure Build Path >> Add jars .

    Unfortunately eclipse still complains about LogFactory class.

    What am I missing here ?

    Best regards

    PEter
    Attached Images Attached Images

  2. #2
    Join Date
    May 2007
    Location
    Ru
    Beans
    67
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Eclipse + Tomcat5.5

    Usually jars are copied to the directory WEB-INF/lib, so that the tomcat server was able to load them.
    Eclipse automatically adds all jars located in WEB-INF/lib to classpath.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •