logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnold Dieter <arnold.die...@siemens.com>
Subject RE: Problem/Instability with DOMConfigurator and several loggers
Date Thu, 22 Aug 2002 08:31:32 GMT
Hi,

I attached a typical exception thrown by Tomcat and my configuration file:

2002-08-22 10:29:00 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp threw exception
javax.servlet.ServletException
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:463)
	at org.apache.jsp.ErrorPage$jsp._jspService(ErrorPage$jsp.java:274)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:431)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:355)
	at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414)
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
	at org.apache.jsp.hcpIndex$jsp._jspService(hcpIndex$jsp.java:245)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http10.HttpProcessor.process(HttpProcessor.jav
a:668)
	at
org.apache.catalina.connector.http10.HttpProcessor.run(HttpProcessor.java:79
0)
	at java.lang.Thread.run(Unknown Source)
----- Root Cause -----
java.lang.NoClassDefFoundError
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Unknown Source)
	at java.beans.Beans.instantiate(Unknown Source)
	at java.beans.Beans.instantiate(Unknown Source)
	at org.apache.jsp.ErrorPage$jsp._jspService(ErrorPage$jsp.java:129)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:431)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:355)
	at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:414)
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:452)
	at org.apache.jsp.hcpIndex$jsp._jspService(hcpIndex$jsp.java:245)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http10.HttpProcessor.process(HttpProcessor.jav
a:668)
	at
org.apache.catalina.connector.http10.HttpProcessor.run(HttpProcessor.java:79
0)
	at java.lang.Thread.run(Unknown Source)



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration debug="true">

    <!--  'logfile' is set to be a FileAppender which outputs to the file
"appserver.log -->
    <appender name="logfile" class="org.apache.log4j.FileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/appserver.log"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %20X{userDn} - %c  -
%m\r\n"/>
        </layout>
    </appender>

    <appender name="mylogfile" class="org.apache.log4j.RollingFileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/mylogger.log"/>
        <param name="MaxFileSize" value="2MB"/>
        <param name="MaxBackupIndex" value="5"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %c - %l - %m %n"/>
        </layout>
    </appender>

    <appender name="performancelog" class="org.apache.log4j.FileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/performance.log"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %20X{userDn} - %c -
%m\r\n"/>
        </layout>
    </appender>



    <!-- 'screeninglog' is set to be a FileAppender which outputs to the
file "screening.log" -->
    <appender name="screeninglog" class="org.apache.log4j.FileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/screening.log"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %20X{userDn} - %c -
%m\r\n"/>
        </layout>
    </appender>

    <!-- 'analysislog' is set to be a FileAppender which outputs to the file
"analysis.log" -->
    <appender name="analysislog" class="org.apache.log4j.FileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/analysis.log"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %20X{userDn} - %c -
%m\r\n"/>
        </layout>
    </appender>

    <!-- Configuration for Console -->
    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <param name="threshold" value="DEBUG"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="[%p] %m\r\n"/>
        </layout>
    </appender>

    <appender name="myDailylogfile"
class="org.apache.log4j.DailyRollingFileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/my5Dailylogger.log"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%d{ISO8601} [%p] - %t - %c - %l - %m %n"/>
        </layout>
    </appender>

    <!-- Configuration for offline viewing with LogFactor 5 -->
    <appender name="lf5dailyfile"
class="org.apache.log4j.DailyRollingFileAppender">
        <param name="threshold" value="DEBUG"/>
        <param name="file" value="logs/lf5Dailylogger.log"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="[slf5s.start]%d{ISO8601} [%p][slf5s.PRIORITY] -
%x[slf5s.NDC]- %t[slf5s.THREAD] - %c[slf5s.CATEGORY] - %l[slf5s.LOCATION] -
%m[slf5s.MESSAGE] %n"/>
        </layout>
    </appender>

    <!-- Configuration for online viewing with LogFactor 5 -->
    <appender name="lf5" class="org.apache.log4j.lf5.LF5Appender">
        <param name="MaxNumberOfRecords" value="2000"/>
    </appender>

    <!-- Configuration for SocketAppender for usage with Chainsaw Logfile
viewer -->
    <appender name="LogServer" class="org.apache.log4j.net.SocketAppender">
        <param name="Port" value="4445"/>
        <param name="RemoteHost" value="127.0.0.1"/>
    </appender>

    <logger name="performance" additivity="true">
        <level value="INFO"></level>
        <appender-ref ref="performancelog"></appender-ref>
    </logger>

    <logger name="modules.screening" additivity="true">
        <level value="DEBUG"></level>
        <appender-ref ref="screeninglog"></appender-ref>
        <appender-ref ref="console"></appender-ref>
    </logger>

    <logger name="modules.analysis" additivity="true">
        <level value="INFO"></level>
        <appender-ref ref="analysislog"></appender-ref>
    </logger>

    <logger name="webapp.jsp" additivity="false">
        <level value="DEBUG"></level>
        <appender-ref ref="lf5"></appender-ref>
    </logger>

    <root>
        <priority value="INFO"/>
        <appender-ref ref="logfile"/>
        <appender-ref ref="mylogfile"/>
        <appender-ref ref="myDailylogfile"/>
    </root>

    <categoryFactory class="de.MyLoggerFactory"/>


</log4j:configuration>


-----Original Message-----
From: Mark Womack [mailto:mwomack@bevocal.com]
Sent: Mittwoch, 21. August 2002 18:59
To: 'Log4J Users List'
Subject: RE: Problem/Instability with DOMConfigurator and several
loggers


Dieter,

I think we would need to see your configuration file and an example of the
failures you are seeing to better give you an answer.

-Mark

> -----Original Message-----
> From: Arnold Dieter [mailto:arnold.dieter@siemens.com]
> Sent: Wednesday, August 21, 2002 7:00 AM
> To: 'log4j-user@jakarta.apache.org'
> Subject: Problem/Instability with DOMConfigurator and several loggers
> 
> 
> I try to configure log4j (log4j-1.2.6) with an XML file and the
> DOMConfigurator (application running on Tomcat 4, Windows 2000).
> When I define several loggers in the file, the initialization 
> works fine,
> but I observe failures in the application (ClassCastException,
> NoClassDefFoundError) which seem not ot have a direct 
> relation with log4j.
> When I am using less loggers, these problems do not occur.
> Also,  when I use a normal property file (with 
> PropertyConfigurator) for
> configuration, everthing works well.
> 
> To me this seems to be a kind of instability or resources 
> problem of log4j.
> Has somebody observed similar problems?
> 
> 
> Thanks in advance
> 
> Dieter
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:log4j-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message