web modules and log4j problem!!!

Hi,

I'm using web modules with tomcat 4.1.29
and I use commons-loging api and log4j.
I have al the needed jar (as you can see from the output)
but the context is not loaded because Logger class can not be found.
But if I place log4j.jar also in /tomcat/common/lib/
everything works fine.
Here is the output (localhost_log.2004-01-08.txt):

2004-01-08 12:16:38 WebappLoader[/cms]: Deploying class repositories to
work directory
C:\IntelliJ-IDEA\system\tomcat_cms3_web_16419dc\work\Standalone\localhost\cms
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy class files
/WEB-INF/classes to C:\tdk-2.3\webapps\cms\WEB-INF\classes
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/cglib2.jar to C:\tdk-2.3\webapps\cms\WEB-INF\lib\cglib2.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/classes12.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\classes12.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-beanutils.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-beanutils.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-collections.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-collections.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-configuration-1.0-dev.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-configuration-1.0-dev.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-fileupload-1.0.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-fileupload-1.0.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-lang.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-lang.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-logging-1.0.3.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-logging-1.0.3.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/commons-logging-api.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\commons-logging-api.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/dom4j.jar to C:\tdk-2.3\webapps\cms\WEB-INF\lib\dom4j.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/dtdmappings.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\dtdmappings.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/ecs-1.4.2.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\ecs-1.4.2.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/ehcache.jar to C:\tdk-2.3\webapps\cms\WEB-INF\lib\ehcache.jar
2004-01-08 12:16:38 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/hibernate2.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\hibernate2.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/jaxen-full.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\jaxen-full.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR /WEB-INF/lib/jta.jar
to C:\tdk-2.3\webapps\cms\WEB-INF\lib\jta.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/junit-3.8.1.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\junit-3.8.1.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/l7common.jar to C:\tdk-2.3\webapps\cms\WEB-INF\lib\l7common.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR /WEB-INF/lib/l7db.jar
to C:\tdk-2.3\webapps\cms\WEB-INF\lib\l7db.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/log4j-1.2.8.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\log4j-1.2.8.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/lucene-20030909.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\lucene-20030909.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR /WEB-INF/lib/odmg.jar
to C:\tdk-2.3\webapps\cms\WEB-INF\lib\odmg.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/stratum-1.0-b3.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\stratum-1.0-b3.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/torque-3.1.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\torque-3.1.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/turbine-2.3.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\turbine-2.3.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/velocity-1.3.1.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\velocity-1.3.1.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Deploy JAR
/WEB-INF/lib/village-2.0-dev-20030825.jar to
C:\tdk-2.3\webapps\cms\WEB-INF\lib\village-2.0-dev-20030825.jar
2004-01-08 12:16:39 WebappLoader[/cms]: Reloading checks are enabled for
this Context
2004-01-08 12:16:39 ContextConfig[/cms]: WARNING: Security role name
admin used in an <auth-constraint> without being defined in a
<security-role>
2004-01-08 12:16:40 ContextConfig[/cms]: Configured an authenticator for
method BASIC
2004-01-08 12:16:40 StandardManager[/cms]: Seeding random number
generator class java.security.SecureRandom
2004-01-08 12:16:40 StandardManager[/cms]: Seeding of random number
generator has been completed
2004-01-08 12:16:40 StandardWrapper[/cms:default]: Loading container
servlet default
2004-01-08 12:16:40 StandardWrapper[/cms:invoker]: Loading container
servlet invoker
2004-01-08 12:16:40 StandardWrapper[/cms:cms]: Marking servlet cms as
unavailable
2004-01-08 12:16:40 StandardContext[/cms]: Servlet /cms threw load()
exception
javax.servlet.ServletException: Error instantiating servlet class
org.apache.turbine.Turbine
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:912)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3422)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
-


Root Cause -


java.lang.ExceptionInInitializerError
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:308)
at java.lang.Class.newInstance(Class.java:261)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3422)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
at org.apache.catalina.core.StandardService.start(StandardService.java:497)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@13f7281 for
org.apache.commons.logging.impl.Log4JLogger
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
at org.apache.turbine.Turbine.]]>(Turbine.java:200)
... 24 more
Caused by: org.apache.commons.logging.LogConfigurationException: No
suitable Log constructor [Ljava.lang.Class;@13f7281 for
org.apache.commons.logging.impl.Log4JLogger
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.getConstructor(Class.java:1019)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:429)
... 29 more

Please sign in to leave a comment.