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 Jeff Singer <je...@vine.co.za> on 2001/12/19 10:29:13 UTC

log4j.dtd:configuration

Hi All

I have the following error:

Error:
URI=jar:file:/usr/java/jdk1.3.1_01/jre/lib/ext/log4j.jar!/org/apache/log4j/x
ml/log4j.dtd Line=3: Attribute xmlns:log4j " is not declared for element
"log4j:configuration".

I know this error has been spoken about in the past. I have looked at the
solutions for the errors, but I must be missing some obvious point.

I have attached my config file, and below is the code snippet of how we
initialise log4j.

Any idea?

cheers
Jeff Singer



CODE:

  private void configureLog4J () throws FatalVineException {
      DOMConfigurator.configure(System.getProperty("Grapevine.conf") +
"log4JConfig.xml" );
  }

  private static boolean isLog4JConfigured () {
    Enumeration enum = Category.getRoot().getAllAppenders();
    if (!(enum instanceof org.apache.log4j.helpers.NullEnumeration)) {
      return true;
    } else {
      Enumeration cats = Category.getCurrentCategories();
      while (cats.hasMoreElements()) {
        Category c = (Category)cats.nextElement();
        if (!(c.getAllAppenders() instanceof
org.apache.log4j.helpers.NullEnumeration )) {
          return true;
        }
      }
    }
    return false;
  }

RE: log4j.dtd:configuration

Posted by Jeff Singer <je...@vine.co.za>.
Hi All

I've tried a number of different solutions. New xml parsers. But I can still
not get rid of this error.

I would really appreciate it if somebody could give me a helping hand.

Thanks in advance
Jeff Singer

> -----Original Message-----
> From: Jeff Singer [mailto:jeff.singer@vine.co.za]
> Sent: 19 December 2001 11:29
> To: LOG4J Users Mailing List
> Subject: log4j.dtd:configuration
>
>
> Hi All
>
> I have the following error:
>
> Error:
> URI=jar:file:/usr/java/jdk1.3.1_01/jre/lib/ext/log4j.jar!/org/apac
> he/log4j/x
> ml/log4j.dtd Line=3: Attribute xmlns:log4j " is not declared for element
> "log4j:configuration".
>
> I know this error has been spoken about in the past. I have looked at the
> solutions for the errors, but I must be missing some obvious point.
>
> I have attached my config file, and below is the code snippet of how we
> initialise log4j.
>
> Any idea?
>
> cheers
> Jeff Singer
>
>
>
> CODE:
>
>   private void configureLog4J () throws FatalVineException {
>       DOMConfigurator.configure(System.getProperty("Grapevine.conf") +
> "log4JConfig.xml" );
>   }
>
>   private static boolean isLog4JConfigured () {
>     Enumeration enum = Category.getRoot().getAllAppenders();
>     if (!(enum instanceof org.apache.log4j.helpers.NullEnumeration)) {
>       return true;
>     } else {
>       Enumeration cats = Category.getCurrentCategories();
>       while (cats.hasMoreElements()) {
>         Category c = (Category)cats.nextElement();
>         if (!(c.getAllAppenders() instanceof
> org.apache.log4j.helpers.NullEnumeration )) {
>           return true;
>         }
>       }
>     }
>     return false;
>   }
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>