tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20171] New: - weird: log4j and filter initialization
Date Thu, 22 May 2003 23:05:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20171>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20171

weird: log4j and filter initialization

           Summary: weird: log4j and filter initialization
           Product: Tomcat 5
           Version: 5.0.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: xliu@capitalthinking.com


I'm trying to port a web app to tomcat 5.0.2 beta release.
This web application works fine on 4.1.18 and 4.0.2.

The problem comes from filter initilization, stack trace attached below.
This web app uses log4j.jar, and the filters has logging calls. One special
thing about this web app is that it is depolyed under a directory outside 
'webapps' and does have 'allowingLinking' flag in context 'Resouces' 
definition. 

Seems it's complaining about log4j not found during filter initialization.
This is so weird for the following reasons:
 
1. sample filters under jsp-exmaples and servlet-examples work fine.
2. I didn't see log4.jar either under tomcat 4.1.18 or 4.0.2
3. If I put a copy of log4j.jar under CATALIAN_HOME/server/lib, all error
messages are gone, but the context is not available (I didn't see it admin) 
screen), and the displayed error msg when accessing index.jsp is:

org.apache.jasper.JasperException: Mandatory TLD element missing or empty: jsp-
version
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError
(DefaultErrorHandler.java:94)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch
(ErrorDispatcher.java:365)

The catalina.out for filter initialization:
May 22, 2003 6:33:32 PM org.apache.catalina.core.StandardContext filterStart

SEVERE: Exception starting filter Form Filter
java.lang.ExceptionInInitializerError
        at org.apache.catalina.core.StandardContext.filterStart
(StandardContext.java:3559)
        at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4112)
        at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:843)
        at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:827)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:623)
        at org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDeployer.java:794)        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.commons.beanutils.MethodUtils.invokeMethod
(MethodUtils.java:252)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
        at org.apache.commons.digester.Rule.end(Rule.java:276)
        at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1536)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDeployer.java:488)

t org.apache.catalina.core.StandardHost.install(StandardHost.java:868)
        at org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:511)
        at org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:468)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:835)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:429)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1241)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:804)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1233)
        at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:532)
        at org.apache.catalina.core.StandardService.start
(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start
(StandardServer.java:2314)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
        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.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)


Caused by: org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: No suitable Log 
constructor [Ljava.lang.Class;@1e82b72 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.catalina.core.ApplicationFilterConfig.<clinit>
(ApplicationFilterConfig.java:95)
        ... 39 more


Caused by: org.apache.commons.logging.LogConfigurationException: No suitable 
Log constructor [Ljava.lang.Class;@1e82b72 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)
        ... 43 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
        at java.lang.Class.getConstructor0(Class.java:1762)
        at java.lang.Class.getConstructor(Class.java:1002)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor
(LogFactoryImpl.java:429)
        ... 44 more


May 22, 2003 6:33:32 PM org.apache.catalina.core.StandardContext filterStart

SEVERE: Exception starting filter Master Filter
java.lang.NoClassDefFoundError
        at org.apache.catalina.core.StandardContext.filterStart
(StandardContext.java:3559)
        at org.apache.catalina.core.StandardContext.start
(StandardContext.java:4112)
        at org.apache.catalina.core.ContainerBase.addChildInternal
(ContainerBase.java:843)
        at org.apache.catalina.core.ContainerBase.addChild
(ContainerBase.java:827)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:623)
        at org.apache.catalina.core.StandardHostDeployer.addChild
(StandardHostDeployer.java:794)        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.commons.beanutils.MethodUtils.invokeMethod
(MethodUtils.java:252)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
        at org.apache.commons.digester.Rule.end(Rule.java:276)
        at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1536)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at org.apache.commons.digester.Digester.parse(Digester.java:1567)
        at org.apache.catalina.core.StandardHostDeployer.install
(StandardHostDeployer.java:488)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:868)
        at org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:511)
        at org.apache.catalina.startup.HostConfig.deployApps
(HostConfig.java:468)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:835)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:429)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1241)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:804)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1233)
        at org.apache.catalina.core.StandardEngine.start
(StandardEngine.java:532)
        at org.apache.catalina.core.StandardService.start
(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start
(StandardServer.java:2314)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
        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.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:394)
May 22, 2003 6:33:32 PM org.apache.catalina.core.StandardContext filterStart

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message