On Feb 3, 2009, at 2:46 AM, Zhao, Frank wrote:

Hi,
Can anyone of you help me resolve below issue?

I am using apache-log4j-1.2.15 and apache-log4j-extras-1.0.jar. here is the error message.

16:04:59,801 INFO  [WebService] Using RMI server codebase: 
http://localhost:8083/
16:04:59,817 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
log4j:WARN Continuable parsing error 50 and column 15
log4j:WARN The content of element type "appender" must match "(errorHandler ?,param *,rollingPolicy ?,triggeringPolicy?,connectionSource?,layout?,filter*,appender-ref*)".
log4j:WARN Unrecognized element rollingPolicy


I found Log4j does not recognize elements <rollingPolicy/> and <triggeringPolicy/>. But there DTD, log4j.dtd, had these elemets. On looking into the log4j code, specifically, org.apache.log4j.xml.DOMConfigurator, the two elements are not there.

Any suggestions are really appreciated.



The first warning suggests that your configuration file may have other problems. Specifically, that you have an appender element nested within another appender element, like:

<log4j:configuration...>
    <appender name="A1">
         <appender name="A2">
              ....
         </appender>
    </appender>
</log4j:configuration>

Could you please examine your configuration file for that issue. If you can not see a problem or you still have any issue, please post your configuration file.

The processing of the rollingPolicy and triggeringPolicy elements is not explicit in the log4j code, but in log4j 1.2.15 and later, if an unrecognized element is encountered, it checks if the object being configured supports UnrecognizedElementHandler and then invokes that interface.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to