Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8149921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:56:52+00:00 2026-06-06T14:56:52+00:00

I want to connect my log4j.xml with log4j.xsd (xml schema). Project don’t have any

  • 0

I want to connect my log4j.xml with log4j.xsd (xml schema). Project don’t have any warnings or errors. But when I start it, Ihave such console warnings:

log4j:WARN Continuable parsing error 6 and column 66.

log4j:WARN Document root element “log4j:configuration”, must match DOCTYPE root “null”.

log4j:WARN Continuable parsing error 6 and column 66.

log4j:WARN Document is invalid: no grammar found.

I think, problem in schema Location. But I don’t know, how to write it normally.
Hope for your’s advices.

My log4j.xml:

  <?xml version="1.0" encoding="UTF-8" ?>

   <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    debug="false"
    xsi:schemaLocation="http://www.example.org/log4j log4j.xsd ">

<appender name="logFileAppender" class="org.apache.log4j.RollingFileAppender">
        <param name="File" value="E:/Codes/HorseRacing/logFile.log"/>
        <param name="MaxFileSize" value="1MB"/>
        <param name="MaxBackupIndex" value="5"/>
        <param name="Encoding" value="UTF-8"/>
        <layout class="org.apache.log4j.EnhancedPatternLayout">
        <param name="ConversionPattern" value="%d{ISO8601} [%-5p][%-16.16t][%40.40c] - %m%n"/>
        </layout>
    </appender>

     <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
        <param name="Encoding" value="Cp866"/>
        <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{ISO8601} [%-5p][%-25.25l][%10.10c] - %m%n" />
        </layout>
    </appender>

   <logger name="appLogger">
        <level value="INFO"/>
        <appender-ref ref="logFileAppender"/>
        <appender-ref ref="ConsoleAppender"/>
    </logger>

</log4j:configuration>

And my log4j.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema attributeFormDefault="unqualified"
    elementFormDefault="qualified" version="1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="configuration">
   <xsd:complexType>
      <xsd:sequence>
        <xsd:element maxOccurs="unbounded" name="appender">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element maxOccurs="unbounded" name="param">
                <xsd:complexType>
                  <xsd:attribute name="name" type="xsd:string" />
                  <xsd:attribute name="value" type="xsd:string" />
                </xsd:complexType>
              </xsd:element>
              <xsd:element name="layout">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="param">
                  <xsd:complexType>
                    <xsd:attribute name="name" type="xsd:string" />
                    <xsd:attribute name="value" type="xsd:string" />
                  </xsd:complexType>
                </xsd:element>
              </xsd:sequence>
              <xsd:attribute name="class" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" />
        <xsd:attribute name="class" type="xsd:string" />
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="logger">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="level">
            <xsd:complexType>
              <xsd:attribute name="value" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element maxOccurs="unbounded" name="appender-ref">
               <xsd:complexType>
                <xsd:attribute name="ref" type="xsd:string" />
               </xsd:complexType>
             </xsd:element>
           </xsd:sequence>
          <xsd:attribute name="name" type="xsd:string" />
         </xsd:complexType>
       </xsd:element>
     </xsd:sequence>
     <xsd:attribute name="debug" type="xsd:boolean" />
     <xsd:attribute name="schemaLocation" type="xsd:string" />
   </xsd:complexType>
  </xsd:element>
   </xsd:schema>

   <logger name="appLogger">
    <level value="INFO"/>
    <appender-ref ref="logFileAppender"/>
    <appender-ref ref="ConsoleAppender"/>
    </logger>

    </log4j:configuration>

P.S. Sorry for my english…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:56:53+00:00Added an answer on June 6, 2026 at 2:56 pm

    The jar that is producing this message expects to see a DTD validated, not schema validated configuration.

    Check your classpath. You are using a too old version of the framework for this configuration. Very likely you have multiple versions of a jar with the same name on your disk, and such occurences will point you to the problem and to removal of very old libraries that you do not really want to use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed VS2010 and I want to connect to TFS, But I don't
I want to connect iphone to a printer via bluetooth, but I don't find
i want to connect a database to my project but i am getting an
I want to connect to a MySql DB but i don't find the code.
I want to connect my rails 3 application to firebird database. I have followed
I want to connect to DB2 from excel macro...This is my code, but it
i want to connect database to iphone sdk but it is taking the default
In my application I want to connect SQL Server Express with Hibernate. But I
want to connect to device and start receiving data from the external device now
I want to connect a MySql DB with my android application. However, I DON'T

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.