I have solved this problem, but the solution was unrelated, so I didn't think of sending it to the list. But here it is: If you are interested - here's what happened: When you import and EJB into Websphere, you must use a command line utility to import the classes into Websphere, as well as their configuration. We bundle all the classes into one jar, and run the command line over that jar. (Not my choice - I would prefer to separate EJB's into a separate jar and import them manually). As it turns out, all my servlets were being loaded from this jar, and not through the normal web-container's classpath. Why this happens I don't know. I can tell you that if your servlets are being loaded from there, then they do not have access to the web container's classpath. Hence my issue. (As log4j sits in the web container's classpath). Solutions: a) Remove Servlet from jar that gets loaded as EJBs b) Include log4j classes in that jar. (a) is the better solution, and that is what I am trying to get implemented here. Thanks for chasing this up! Scott >>> Ceki Gülcü <[EMAIL PROTECTED]> 04/12/01 02:44am >>> Have you solved the problem or do you still need help? Ceki At 08:48 10.04.2001 +1000, you wrote: >I know that it is probably a Websphere problem, but I'm hoping that perhaps someone >has come across this before: > >When using log4j from a jsp, I have no problems. As soon as I use it from a servlet, >I get the following error: >java.lang.NoClassDefFoundError: org/apache/log4j/Category > >Can anyone shed any light on why the jsp classloader has no problems, whilst the >servlet one does? > >Thanks > >Scott > >java.lang.NoClassDefFoundError: org/apache/log4j/Category > at com.swc.cibs.edeveloper.LogTest.doGet(LogTest.java:47) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:626) > at >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:160) > at >com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287) > at >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:105) > at >com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:360) > at >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:775) > at >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:701) > at >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:404) > at >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:203) > at >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:107) > at >com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:77) > at >com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) > at >com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:155) > at >com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300) > at >com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerImp.java:230) > at >com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.java:104) > at >com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.java:212) > at >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(SQWrapperEventSource.java:353) > at >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQWrapperEventSource.java:220) > at >com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(OutOfProcThread.java:248) > at java.lang.Thread.run(Thread.java:481) > > > > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] -- Ceki Gülcü Web: http://qos.ch email: [EMAIL PROTECTED] or [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]