Discussions

Web tier: servlets, JSP, Web frameworks: struts initialization error in Sun ONE AppServer

  1. [04/Mar/2004:16:11:47] SEVERE ( 2964): WebModule[/simple]: Servlet /simple threw load() exception
    javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:898)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3346)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3592)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
    at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
    at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
    at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)
    ----- Root Cause -----
    java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:140)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:253)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:375)
    at org.apache.struts.action.ActionServlet.<clinit>(ActionServlet.java:375)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:306)
    at java.lang.Class.newInstance(Class.java:259)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:889)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3346)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3592)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345)
    at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
    at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
    at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
    at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)

    log4j was not used in the program, when I add the log4j.jar to the web-inf/lib folder, it also does not work. could anybody explain this ?

    Any responses are appeciated.
  2. I've just hit this problem myself, found the solution and posted it in response to a similar problem on the Sun forums.
  3. Sorry- the link didn't work- let's try again:

    http://swforum.sun.com/jive/thread.jspa?messageID=60020