Hi, Tomcat already ships with and uses commons-logging, and that's why this is not trivial. So you need to be careful, and understand the difference between a ClassNotFoundException and a NoClassDefFoundError. (As an aside, this is a good interview question, I bet less than one in five Java developers can explain this one well).
You have two choices: completely separate your logging configuration from the server's, or merge the two. See the FAQ links: http://jakarta.apache.org/tomcat/faq/misc.html#commonsLoggingLog4j. Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Rishi Pande [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 29, 2004 5:34 PM >To: 'Tomcat Users List' >Subject: NoClassDefFoundError > >Hello, > I am using tomcat 5.0.25. One of my jar web applications requires >the commons-logging.jar file. However, no matter where I put it >(server/lib, >common/lib, shared/lib, webapps/app/WEB-INF/lib) I get a >NoClassDefFoundError. I am completely clueless about this. > It would be great to hear any suggestions from the list. > Rishi > >Here's the stacktrace: >exception > >javax.servlet.ServletException: Servlet execution threw an exception > >root cause > >java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory > edu.vt.middleware.ldap.Ldap.<clinit>(Unknown Source) > edu.vt.middleware.ldap.ed.EdAuth.<init>(Unknown Source) > >edu.vt.sakai.plugin.VTLdapAuthService.authenticateUser(VTLdapAuthServic e.ja >v >a:39) > >org.sakaiproject.component.legacy.user.BaseUserDirectoryService.authent icat >e >(BaseUserDirectoryService.java:758) > >org.sakaiproject.service.legacy.user.cover.UserDirectoryService.authent icat >e >(UserDirectoryService.java:177) > >org.sakaiproject.component.framework.session.BaseUsageSessionService.lo ginS >e >ssionUser(BaseUsageSessionService.java:235) > >org.sakaiproject.service.framework.session.cover.UsageSessionService.lo ginS >e >ssionUser(UsageSessionService.java:57) > >org.jasig.portal.security.provider.SakaiUserSecurityContext.authenticat e(Sa >k >aiUserSecurityContext.java:195) > >org.jasig.portal.services.Authentication.authenticate(Authentication.ja va:1 >0 >4) > org.jasig.portal.LoginServlet.doGet(LoginServlet.java:160) > org.jasig.portal.LoginServlet.doPost(LoginServlet.java:127) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > >org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:75) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]