title: Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping"
body: <p>in my code im trying to map person_details from database. the configuration file is as follows hibernate.cfg.xml</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="connection.url"&gt;
              jdbc:mysql://localhost/test
          &lt;/property&gt;
          &lt;property name="connection.driver_class"&gt;
              com.mysql.jdbc.Driver
          &lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;
              root
          &lt;/property&gt;
          &lt;property name="connection.password"&gt;
              gopal
          &lt;/property&gt;
          &lt;property name="connection.pool_size"&gt;
              1
          &lt;/property&gt;
          &lt;property name="hibernate.dialect"&gt;
              org.hibernate.dialect.HSQLDialect
          &lt;/property&gt;
          &lt;property name="show_sql"&gt;
              true
          &lt;/property&gt;
          &lt;property name="hbm2ddl.auto"&gt;
              create
          &lt;/property&gt;
          &lt;mapping resource="com/sixdee/persondetail/pesondetail.hbm.xml" /&gt;
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>the mapping xml file is as below</p>
  
  <p>persondetail.hbm.xml</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC 
  "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
  &lt;Hibernate-mapping&gt;
      &lt;class name="com.sixdee.Persondetail" table="person_details"&gt;
          &lt;id name="id" type="integer" column="EMP_ID"&gt;
              &lt;generator class="assigned" /&gt;
          &lt;/id&gt;
          &lt;property name="gender" type="String" column="GENDER" /&gt;
          &lt;property name="age" type="integer" colummn="AGE" /&gt;
          &lt;property name="dob" type="String" column="DOB" /&gt;
      &lt;/class&gt;
  &lt;/Hibernate-mapping&gt;
  </code></pre>
  
  <p>the main class is as follows
  persondetailmain.java</p>
  
  <pre><code>    package com.sixdee.persondetail;
  
  import org.hibernate.HibernateException;
  import org.hibernate.Session;
  import org.hibernate.SessionFactory;
  import org.hibernate.Transaction;
  import org.hibernate.cfg.Configuration;
  
  
  
  public class Persondetailmain {
      public static void main(String[] args) {
          Session session = null;
          try{
              SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
              session=sessionFactory.openSession();
              Transaction transaction=null;
              transaction=session.beginTransaction();
              Persondetail person=new Persondetail(3,"male",23,"12-06-1990");
              session.save(person);
              transaction.commit();
          }
          catch (NullPointerException e) {
              e.printStackTrace();
          }
          catch (HibernateException e) {
              e.printStackTrace();
  
          }
  
          finally{
              if(session!=null){
                  session.close();
                  session=null;
              }
  
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>on running main method im getting following errors....</p>
  
  <pre><code>    org.hibernate.MappingException: invalid configuration
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1521)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
      at com.sixdee.persondetail.Persondetailmain.main(Persondetailmain.java:15)
  Caused by: org.xml.sax.SAXParseException: Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping".
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
      at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1621)
      at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1900)
      at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:764)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3104)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
      at org.dom4j.io.SAXReader.read(SAXReader.java:465)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
      ... 3 more
  </code></pre>
  
  <p>please help me out</p>