2 Replies Latest reply on Apr 30, 2003 11:13 AM by Christof A

    log4j DOMConfigurator problem from within an MBean

    Christof A Newbie

      Hi,

      I'm using JDK1.4.1_01, using jboss 3.0.4 with Tomcat.
      I have created an MBean for my application, which is loading an extra log4j configuration file in XML using the log4j DOMConfigurator.

      Here comes the problem: I have a perfectly valid xml configuration file witch is loading without any errors in a standalone application, but when loaded via my MBean, is giving the following errors:

      12:02:02,193 ERROR [STDERR] log4j:ERROR Parsing error on line 9 and column -1
      12:02:02,203 ERROR [STDERR] log4j:ERROR Element "log4j:configuration" allows no further input; "appender" is not allowed.
      12:02:02,213 ERROR [STDERR] log4j:ERROR Parsing error on line 16 and column -1
      12:02:02,223 ERROR [STDERR] log4j:ERROR Element "log4j:configuration" allows no further input; "appender" is not allowed.
      12:02:02,243 ERROR [STDERR] log4j:ERROR Parsing error on line 29 and column -1
      12:02:02,253 ERROR [STDERR] log4j:ERROR Element "log4j:configuration" allows no further input; "category" is not allowed.
      12:02:02,263 ERROR [STDERR] log4j:ERROR Parsing error on line 34 and column -1
      12:02:02,273 ERROR [STDERR] log4j:ERROR Element "log4j:configuration" allows no further input; "category" is not allowed.
      12:02:02,283 ERROR [STDERR] log4j:ERROR Parsing error on line 42 and column -1
      12:02:02,283 ERROR [STDERR] log4j:ERROR Element "log4j:configuration" allows no further input; "category" is not allowed.

      Now it seems that although I get these errors, this configuration is really used by log4j and working correctly. If I load the same settings via properties files (using PropertyConfigurator in stead of DOMConfigurator), everything goes fine without errors. I have debugged and the DocumentBuilder that is used is still the one from Crimson (so no other one is used).

      Anybody any idea how to fix this ?

      thx,

      came