You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Francis ANDRE <fr...@orange.fr> on 2009/11/15 14:53:42 UTC

Problem on including DTD entity in a log4j configuration file

Hi log4j users

With the following log4j configuration:
--------------------------------------
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [
    <!ENTITY common SYSTEM "common.xml">
]>
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' 
debug='true'>

    &common;

</log4j:configuration>
---------------------------------------
I got a XML parsing warning as line 9 column 23 which is exactly the 
column just after the </log4j:configuration>   

Any idea??


log4j:WARN Continuable parsing error 9 and column 23
log4j:WARN The content of element type "log4j:configuration" must match 
"(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Desired logger sub-class: [iso.itu.osi.msap.MSAPLogger]
log4j: Setting [responder.iso.itu.osi.msap] additivity to [true].
log4j: Level value for responder.iso.itu.osi.msap is  [debug].
log4j: responder.iso.itu.osi.msap level set to DEBUG
log4j: Class name: [org.apache.log4j.FileAppender]
log4j: Setting property [file] to [log/server.msap.log].
log4j: Setting property [append] to [true].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%d{ISO8601}: %-9p %5c{1} 
-  %m
].
log4j: setFile called: log/server.msap.log, true
log4j: setFile ended
log4j: Adding appender named [responder.msap.log] to category 
[responder.iso.itu.osi.msap].
log4j: Desired logger sub-class: [iso.itu.osi.msap.MSAPLogger]
log4j: Setting [initiator.iso.itu.osi.msap] additivity to [true].
log4j: Level value for initiator.iso.itu.osi.msap is  [debug].
log4j: initiator.iso.itu.osi.msap level set to DEBUG
log4j: Class name: [org.apache.log4j.FileAppender]
log4j: Setting property [file] to [log/client.msap.log].
log4j: Setting property [append] to [true].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%d{ISO8601}: %-9p %5c{1} 
-  %m
].
log4j: setFile called: log/client.msap.log, true
log4j: setFile ended
log4j: Adding appender named [initiator.msap.log] to category 
[initiator.iso.itu.osi.msap].
log4j: Desired logger sub-class: [iso.itu.osi.sap.SAPLogger]
log4j: Setting [responder.iso.itu.osi] additivity to [true].
log4j: Desired logger sub-class: [iso.itu.osi.sap.SAPLogger]
log4j: Setting [initiator.iso.itu.osi] additivity to [true].
log4j: Desired logger sub-class: [iso.itu.osi.tsap.TSAPLogger]




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Problem on including DTD entity in a log4j configuration file

Posted by Francis ANDRE <fr...@orange.fr>.
Hi Curt
>
> The message is reporting that the content after common.xml is merged 
> is not valid according to the DTD.  The DOMConfigurator is less strict 
> than the DTD that specifies (ignoring atypical elements)  all the 
> appender elements appear first, then any logger elements, then an 
> optional root element.  In XML DTD, if you cannot constrain the number 
> of elements of a specific type without constraining the order.
>
You are rigth that's the problem... Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Problem on including DTD entity in a log4j configuration file

Posted by Curt Arnold <ca...@apache.org>.
On Nov 15, 2009, at 2:25 PM, Brett Randall wrote:

> What is in common.xml, and is it valid according to the dtd?
>
> Brett
>

The message is reporting that the content after common.xml is merged  
is not valid according to the DTD.  The DOMConfigurator is less strict  
than the DTD that specifies (ignoring atypical elements)  all the  
appender elements appear first, then any logger elements, then an  
optional root element.  In XML DTD, if you cannot constrain the number  
of elements of a specific type without constraining the order.




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Problem on including DTD entity in a log4j configuration file

Posted by Brett Randall <ja...@gmail.com>.
What is in common.xml, and is it valid according to the dtd?

Brett


On 11/16/09, Francis ANDRE <fr...@orange.fr> wrote:
> Hi log4j users
>
> With the following log4j configuration:
> --------------------------------------
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [
>     <!ENTITY common SYSTEM "common.xml">
> ]>
> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
> debug='true'>
>
>     &common;
>
> </log4j:configuration>
> ---------------------------------------
> I got a XML parsing warning as line 9 column 23 which is exactly the
> column just after the </log4j:configuration>
>
> Any idea??
>
>
> log4j:WARN Continuable parsing error 9 and column 23
> log4j:WARN The content of element type "log4j:configuration" must match
> "(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".
> log4j: reset attribute= "false".
> log4j: Threshold ="null".
> log4j: Desired logger sub-class: [iso.itu.osi.msap.MSAPLogger]
> log4j: Setting [responder.iso.itu.osi.msap] additivity to [true].
> log4j: Level value for responder.iso.itu.osi.msap is  [debug].
> log4j: responder.iso.itu.osi.msap level set to DEBUG
> log4j: Class name: [org.apache.log4j.FileAppender]
> log4j: Setting property [file] to [log/server.msap.log].
> log4j: Setting property [append] to [true].
> log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> log4j: Setting property [conversionPattern] to [%d{ISO8601}: %-9p %5c{1}
> -  %m
> ].
> log4j: setFile called: log/server.msap.log, true
> log4j: setFile ended
> log4j: Adding appender named [responder.msap.log] to category
> [responder.iso.itu.osi.msap].
> log4j: Desired logger sub-class: [iso.itu.osi.msap.MSAPLogger]
> log4j: Setting [initiator.iso.itu.osi.msap] additivity to [true].
> log4j: Level value for initiator.iso.itu.osi.msap is  [debug].
> log4j: initiator.iso.itu.osi.msap level set to DEBUG
> log4j: Class name: [org.apache.log4j.FileAppender]
> log4j: Setting property [file] to [log/client.msap.log].
> log4j: Setting property [append] to [true].
> log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
> log4j: Setting property [conversionPattern] to [%d{ISO8601}: %-9p %5c{1}
> -  %m
> ].
> log4j: setFile called: log/client.msap.log, true
> log4j: setFile ended
> log4j: Adding appender named [initiator.msap.log] to category
> [initiator.iso.itu.osi.msap].
> log4j: Desired logger sub-class: [iso.itu.osi.sap.SAPLogger]
> log4j: Setting [responder.iso.itu.osi] additivity to [true].
> log4j: Desired logger sub-class: [iso.itu.osi.sap.SAPLogger]
> log4j: Setting [initiator.iso.itu.osi] additivity to [true].
> log4j: Desired logger sub-class: [iso.itu.osi.tsap.TSAPLogger]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

-- 
Sent from my mobile device

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org