You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by J T <fu...@gmail.com> on 2006/02/01 15:57:15 UTC

Just adding log4j.jar to struts 1.2.7 project under weblogic causes stack trace

I would like to use log4j for logging under struts. As soon as I add the
log4j.jar to my WEB-INF/lib directory (I tried 1.2-13, 1.2-12, 1.2-8, etc)
and try to access the application I get a 500 internal error (below). When I
remove it my app runs normally. I have tried using log4j.properties &
commons-logging.properties both with and without the jar present and no logs
were produced in any of the cases.

Any thoughts on why this is happening? Is there a log4j version recommended
for struts 1.2.7? I only want a logging framework that can write to a file
and I don't think SimpleLog can do that.

Versions
Struts 1.2.7
lo4j - various
weblogic - 8.1.2.0

Error 500--Internal Server Error

java.lang.NoClassDefFoundError
    at sun.reflect.GeneratedConstructo rAccessor191.newInstance(Unknown
Source)
    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 weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(
ServletStubImpl.java:991)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs (
AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java
:118)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(
ServletStubImpl.java:869)
    at weblogic.servlet.internal.ServletStubImpl.createInstances (
ServletStubImpl.java:848)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(
ServletStubImpl.java:787)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(
ServletStubImpl.java:518)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet (
ServletStubImpl.java:362)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
ServletStubImpl.java:305)
    at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(
WebAppServletContext.java :6350)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(
AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java
:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet (
WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(
ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run (ExecuteThread.java:170)